From a1c5b014da305b43da45b57e76c2c273270ad4b4 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 17 Sep 2013 00:34:48 +0200 Subject: Pretend to be a joystick a bit harder for udev --- ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ftnoir_protocol_libevdev') diff --git a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp index 74986299..dec4f847 100644 --- a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp +++ b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.cpp @@ -46,6 +46,9 @@ FTNoIR_Protocol::FTNoIR_Protocol() : dev(NULL), uidev(NULL) CHECK_LIBEVDEV(libevdev_enable_event_code(dev, EV_ABS, ABS_RZ, &absinfo)); + CHECK_LIBEVDEV(libevdev_enable_event_type(dev, EV_KEY)); + CHECK_LIBEVDEV(libevdev_enable_event_code(dev, EV_KEY, BTN_JOYSTICK, NULL)); + CHECK_LIBEVDEV(libevdev_uinput_create_from_device(dev, LIBEVDEV_UINPUT_OPEN_MANAGED, &uidev)); return; -- cgit v1.2.3