WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-12-2017, 07:26 AM
mattyi mattyi is offline
Registered User
 
Join Date: Jun 2017
Posts: 1
Number Pad input

Hi all,

I'm hoping that someone knows how to get vizact.onkeydown to recognize a number pad input. For example, if I enter:


Code:
vizact.onkeydown('0',myFunction)
Vizard will recognize the 0 above the letters on my keyboard, but not the 0 on the number pad. What do I use to get it to recognize the characters from that source?

I ask because I've created a simple response time task using vizard which tracks the workload of subjects in a behavioral study. There is limited space in the environment where the study is being run, and a small USB number pad is a pretty good input device that takes up very little space.
Reply With Quote
  #2  
Old 06-13-2017, 10:02 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Try using key codes instead of numbers to get the number pad key events:
Code:
def printKey(key):
	print key
	
vizact.onkeydown(viz.KEY_KP_0,printKey,'KP_0')
vizact.onkeydown(viz.KEY_KP_1,printKey,'KP_1')
vizact.onkeydown(viz.KEY_KP_2,printKey,'KP_2')
vizact.onkeydown(viz.KEY_KP_3,printKey,'KP_3')
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
Regarding Flystick2 not detected in Vizconnect as an input rajnishv Vizard 2 11-28-2016 03:08 AM
Switching between input devices setup in vizconnect and not using vizconnect JB_HP_Viz Vizard 1 01-20-2015 05:19 AM
Blindfolding screen, asking for input, unblindfolding. saajaja Vizard 5 11-14-2013 08:08 AM
does vizard handle input differently when it's embedded? Adam.Grey Vizard 3 06-28-2012 09:07 AM
problem with input boxes shai Vizard 6 08-15-2005 10:51 AM


All times are GMT -7. The time now is 08:10 AM.


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