joystick.linux
#
- class platypush.backend.joystick.linux.JoystickLinuxBackend(device: str = '/dev/input/js0', *args, **kwargs)[source]#
Bases:
Backend
This backend intercepts events from joystick devices through the native Linux API implementation.
It is loosely based on https://gist.github.com/rdb/8864666, which itself uses the Linux kernel joystick API to interact with the devices.
Triggers:
platypush.message.event.joystick.JoystickConnectedEvent
when the joystick is connected.platypush.message.event.joystick.JoystickDisconnectedEvent
when the joystick is disconnected.platypush.message.event.joystick.JoystickButtonPressedEvent
when a joystick button is pressed.platypush.message.event.joystick.JoystickButtonReleasedEvent
when a joystick button is released.platypush.message.event.joystick.JoystickAxisEvent
when an axis value of the joystick changes.