support joysticks for driving the pointer
This is an accessibility feature.
Some users can not use a mouse, but a joystick. For this to work the joystick has to be able to emulate a mouse. This could be done in libinput, the basic event handling
libinput does not support joysticks as joysticks, for the simple reason that there's too many of them, too many varied features that games request and a common API is hard to agree on. These concerns are not the same when we consider the joystick merely for pointer control.
Some notes:
-
how to notify libinput that a joystick needs to be handled? - udev-tags: don't allow for a per-user configuration, need to be root to write them. permanent configuration, hard to write and test
- libinput-specific configuration file: similar to the existing quirks, but user-specified.
- a path-like backend where mutter tells libinput "definitely add this device"
-
button mapping configuration - joysticks don't have
BTN_LEFT
etc. so we need to remap theirBTN_0
and similar to the expected mouse buttons. this needs to be configurable, or at least read in from a static configuration file - there is likely demand for things like double-clicks and button locking
- joysticks don't have
-
GUI integration: this should be shown somewhere in the GUI so it must be discoverable
Let's use this first commit as a wiki to have the summary of any discussions below.
cc @carlosg
Edited by Peter Hutterer