key duration
Hi,
How to get duration between a key down and key up during task? During watching some VR scene (or VR avatar) for 5 sec, I want to measure participants' key-press duration (how long participant presses the key). viztask.waitKeyUp may be suitable, but it terminates the VR scene showing. |
Hey Roy,
If you don't want yield statements terminating your scene, I would suggest using the onkeydown and onkeyup function in the vizact library. Use the respective up and down functions to log the time using viz.tick() in global variables and then find the difference to calculate the elapsed time. This should occur without causing any disruption in the scene being run. Hope it helps. Best, Kenneth |
Hi Kenneth,
Please see the codes which use the onkeydown&up methods as below. Code:
def keyDown(): The key duration should be calculated by the first keydown time (19.2442121). How to fix it? Quote:
|
All times are GMT -7. The time now is 07:58 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC