Joystick Toolkit - @octave_joystick/button
- :
joy =
button(joy, id)
Get the value of button id on joystick joy.
Inputs
joy - a previously opened joystick object
id - a positive numeric id for the joystick button to use
id can be a vector of ids to allow getting multiple buttons.
Outputs
value - value of the button (0 or 1).
value will be a vector of values when getting multiple buttons.
Examples
Open device 1 and get value of button 1
joy = vrjoystick(1); val = button(joy, 1)
See also: vrjoystick.