Joystick Toolkit - vrjoystick
- :
joy =vrjoystick(id) - :
joy =vrjoystick(id, "forcefeedback") Open a joystick device.
Inputs
id - a positive numeric id for the joystick device to use.
"forcefeedback" - String constant to enable forcefeedback.
Outputs
joy - an octave_joystick object.
Joystick Properties
A joystick object has the following properties:
- ID
The ID of the joystick as used to create the joystick
- Name
The name of the joystick device
- Status
Status of the joystick ("Open" or "Closed")
- ForceFeedbackSupported
Boolean indicating whether the joystick was opened with force-feedback enabled and supports force-feedback.
Joystick Functions
A joystick object provides the following functions:
- axis
Get the value of a joystick axis
- button
Get the state of a joystick button
- caps
Get the capabilities of the joystick
- close
Close a joystick
- force
Set the forcefeedback forces on a joystick
- pov
Get the pov values from a joystick
- read
Read all state values from a joystick
Examples
Open device 1
joy = vrjoystick(1);See also: vrjoysticklist.