Vizard 7 » Command Index » Vizard modules » viz » <viz>.setEventAction
7.5

<viz>.setEventAction

Set the action to take for the current event

<viz>.setEventAction(  
flags  
)  
flags
A combination of the following event action flags:

Flag

Description

viz.EVENT_STOP

Stop the event from being passed on to remaining handlers.

viz.EVENT_PREVENT_DEFAULT

Prevent any default behavior the application would perform for the event.

Remarks

This command will apply the specified action flags on the event that is currently being triggered.

Return Value

None

Example

def onKeyDown(key):
    
    if key == ' ':
        
        # Stop the event from being passed to remaining handlers
        viz.setEventAction(viz.EVENT_STOP)

See also

<viz>.sendEvent