WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-11-2016, 09:28 AM
VizMars VizMars is offline
Member
 
Join Date: Jan 2016
Posts: 40
Wait for specific cedrus key

My cedrus handler triggers an event viz.sendEvent(CEDRUS_BUTTON_DOWN, response['key']) every time a cedrus button is pressed.

How can I pause my Experiment until a specific cedrus key is pressed (e.g. button 6 is down)?
Reply With Quote
  #2  
Old 05-13-2016, 04:02 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can use viztask and the waitEvent command to wait for the cedrus button event.
Reply With Quote
  #3  
Old 05-14-2016, 10:43 AM
VizMars VizMars is offline
Member
 
Join Date: Jan 2016
Posts: 40
But in this case every cedrus button resumes my experiment.
How can I wait for a specific button? (e.g. button 6)
Reply With Quote
  #4  
Old 05-16-2016, 12:48 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Are you using the vizxid module to get the Cedrus data, like the example posted here? If so, you can wait for a specific button press:

Code:
#Wait for button 3 on XID to be pressed
yield vizxid.waitButtonDown(3,d)
Reply With Quote
  #5  
Old 05-17-2016, 02:29 AM
VizMars VizMars is offline
Member
 
Join Date: Jan 2016
Posts: 40
I'm using pyxid. But I'll have a closer look at the implementation of waitButtonDown.
Reply With Quote
Reply

Tags
cedrus

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
wait for vizproximity and waitKeyDown in task krimble Vizard 2 08-14-2013 03:14 AM
Cedrus Response Pad? Trevor Vizard 1 08-16-2012 04:26 PM
Wait for function to return? Josh Vizard 4 04-15-2010 02:11 PM
Wait for an audio file to end playing until new action possible? Josh Vizard 1 03-07-2010 10:13 PM
Sit, stay, wait? EnvisMJ Vizard 1 05-20-2009 04:36 PM


All times are GMT -7. The time now is 10:39 PM.


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