Input devices/Development
| This page could use some expansion. If you'd like to help out, feel free to edit this article!
In particular: This has been moved from several input-related articles. Cleanup and ideas how to organize it better are welcome. |
Keyboard
TODO
Buttons
TODO
Touch keys
KEY_APPSELECT limitation
KEY_APPSELECT has a kernel keycode of 580 (0x244).[1] In xkb library this is keycode 588. Keycodes above 255 are not processed in X11 because X11 uses 8 bit keycodes.[2] Therefore, KEY_APPSELECT is not available in X11 UIs. Wayland uses 32 bit keycodes and does not have this limitation.[3] However, the key isn't processed properly in Phosh, some parts of software don't handle it correctly. Also in Plasma Mobile the key can't be used for shortcut assignment.
Gaming devices
TODO
Touchscreen
Mediatek devices
Some touchscreen drivers on Mediatek devices have issues because they don't follow the standards. You can compare the driver source of your driver (especially the functions tpd_up and tpd_down) with the Fairphone 1 touchscreen driver and see if adjusting your touchscreen driver to mostly match that behavior helps.
sec_touchscreen: kernel bug
event3 - sec_touchscreen: kernel bug: device has min == max on ABS_MT_PRESSURE from libinput debug-events
This message, which can be found in libinput debug-events indicates that the touchscreen driver in the kernel is misbehaving and that libinput won't accept the input.
In this case, solving the issue means patching the touchscreen driver, which will require you to modify your kernel code. While the device is running, figure out which driver is being used, perhaps by running find /sys -name "input*" or find /sys -name "event*", use grep in your kernel source to find the line line that contains input_set_abs_params(input_dev, ABS_MT_PRESSURE, 0, 0);, and comment it out. Rebuild the kernel and try again. See our patching guide for more information about how to make these changes correctly.
Touch screen device present but not outputting any touch events
For some devices (at least motorola-shamu and motorola-lux), the touch screen I2C device is present but not activated at boot, and must be activated before it produces any output.
For the motorola-lux, this is done in the following way:
echo 1 > /sys/devices/soc.0/78b8000.i2c/i2c-4/4-0020/drv_irq
The path to the correct touch device depends on the device. The command has to be added to an initfs hook to activate the touch screen automatically at boot.
See also
- pmaports#337 Touchscreen issues on the Huawei Y3 II 3G
- libinput issue with details of the issue on the Fairphone 1
- Linux kernel Multi-touch Protocol documentation
- Tm2-touchkey