This patch allows libinput to ignore devices that have joystick buttons.
Signed-off-by: Krzysztof Sobiecki <[email protected]>
---
src/evdev.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/evdev.c b/src/evdev.c
index 36c6859..5f6cc32 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1274,6 +1274,15 @@ evdev_configure_device(struct evdev_device *device)
has_keyboard = 0;
has_touch = 0;
+ for (i = BTN_JOYSTICK; i < BTN_DIGI; i++) {
+ if (libevdev_has_event_code(evdev, EV_KEY, i)) {
+ log_info(libinput,
+ "input device '%s', %s is a joystick, ignoring\n",
+ device->devname, device->devnode);
+ return -1;
+ }
+ }
+
if (libevdev_has_event_type(evdev, EV_ABS)) {
if ((absinfo = libevdev_get_abs_info(evdev, ABS_X))) {
--
2.2.0.rc0.207.ga3a616c
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel