JoystickAPI
Jump to navigation
Jump to search
bug 604039 covers prototyping a way for web content to receive input from Joystick/gamepad controllers connected to a computer.
Initial Implementation
The patches currently on the bug implement a simple set of DOM events:
- MozJoyButtonDown
- MozJoyButtonUp
- These events currently have the properties:
- unsigned long joystickID: an arbitrary integer ID that's unique per connected device
- unsigned long button: button number being pressed/released
- MozJoyAxisMove
- This event currently has the properties:
- unsigned long joystickID: an arbitrary integer ID that's unique per connected device
- unsigned long axis: axis number being moved
- float value: position of the axis in the range -1.0...1.0