WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-15-2011, 07:59 AM
madeinjava madeinjava is offline
Member
 
Join Date: Dec 2011
Posts: 5
Arrow Keyboard Shorcut

Hi all,

I need to make some keyboard shortcut (instead a single button) into my VR world. Its work fine when only using single button shortcut like this:
...
def onKeyDown(key):
...
if key == 'c':
print 'Hello World!'
...

However I want to assign a standard windows shortcut, like: Ctrl+z, Ctrl+v, or maybe just 2 or 3 button combinations ('a'+'b' button, etc.)etc.
How I can implement this? I tried using:
...
if key == viz.key.allDown(['a','b']):
print 'Hello World!'
...
I tried using anyDown() as well but none of this works.
Any suggestion what should I do? or I made a mistake there?

Thanks alot!
Reply With Quote
  #2  
Old 12-20-2011, 05:34 AM
madeinjava madeinjava is offline
Member
 
Join Date: Dec 2011
Posts: 5
Smile Solved! :)

Quote:
Originally Posted by madeinjava View Post
Hi all,

I need to make some keyboard shortcut (instead a single button) into my VR world. Its work fine when only using single button shortcut like this:
...
def onKeyDown(key):
...
if key == 'c':
print 'Hello World!'
...

However I want to assign a standard windows shortcut, like: Ctrl+z, Ctrl+v, or maybe just 2 or 3 button combinations ('a'+'b' button, etc.)etc.
How I can implement this? I tried using:
...
if key == viz.key.allDown(['a','b']):
print 'Hello World!'
...
I tried using anyDown() as well but none of this works.
Any suggestion what should I do? or I made a mistake there?

Thanks alot!
Problem solved!
Basically I need to 'listen' first from keypress (using onKeyDown) and then checks every keyhits on allDown or anyDown function.

Ps. thanks to clevr team for give me the hint
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
User keyboard input without halting the program Zhi Vizard 2 06-23-2011 01:53 PM
Keyboard shortcuts for debugging kopper Vizard 6 03-25-2011 06:23 PM
Question about input from virtual keyboard. yyang Vizard 4 12-23-2008 01:25 PM
On Screen Keyboard betancourtb82 Vizard 14 10-03-2006 01:38 PM
Multiple Viewports in Vizard, Utilizing keyboard callback shivanangel Vizard 2 02-21-2006 05:56 PM


All times are GMT -7. The time now is 04:48 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC