Vizard 7 » Command Index » Vizard modules » viztask » <viztask>.waitKeyUp
7.6

<viztask>.waitKeyUp

Wait for a specified key release

<viztask>.waitKeyUp(  
keys  
)  
keys
Key to wait for.

If keys is a sequence, then the Condition will wait for one of the keys to be released.

If keys is None, then the Condition will wait for any key to be released.

Remarks

This command will create a Condition object that will wait for one of the specified keys to be released.

The yielded command returns a viz.Data object with the following information about the condition:

Properties

key

The key that was released

time

The precise time of the key press


Return Value

viztask.Condition object

Example

import viztask

def MyTask():

    while True:

        yield viztask.waitKeyUp(' ')

        print('Spacebar released')

viztask.schedule( MyTask() )

See also

<viztask>.waitKeyChar
<viztask>.waitKeyDown