<vizjoy:joystick>.getButtonState

Returns button state

 

<vizjoy:joystick>.getButtonState()

 

Remarks

This command will return the current button state. The return value is a bit flag, where each bit represents the state of one of the buttons. Use the predefined button values to check if a button is down (i.e. vizjoy.BUTTON1, vizjoy.BUTTON2, ... , vizjoy.BUTTON10)

Return Value

Button state

Example

state = joystick.getButtonState()

if state & vizjoy.BUTTON1:
    print 'Button 1 is down'
if state & vizjoy.BUTTON2:
    print 'Button 2 is down'