diff --git a/src/libinput-plugin-button-debounce.c b/src/libinput-plugin-button-debounce.c index 1062a34c..bcc79c00 100644 --- a/src/libinput-plugin-button-debounce.c +++ b/src/libinput-plugin-button-debounce.c @@ -743,6 +743,15 @@ debounce_plugin_device_added(struct libinput_plugin *libinput_plugin, libinput_plugin_enable_device_event_frame(libinput_plugin, device, true); + /* We don't care about BTN_TRIGGER_HAPPY_* */ + for (unsigned int code = BTN_0; code <= KEY_OK; code++) { + evdev_usage_t usage = evdev_usage_from_code(EV_KEY, code); + if (evdev_usage_is_button(usage)) { + libinput_plugin_enable_evdev_usage(libinput_plugin, + evdev_usage_enum(usage)); + } + } + struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin); struct plugin_device *pd = zalloc(sizeof(*pd)); pd->device = libinput_device_ref(device); diff --git a/src/libinput-plugin-mouse-wheel-lowres.c b/src/libinput-plugin-mouse-wheel-lowres.c index 4302c2be..fb92fa5c 100644 --- a/src/libinput-plugin-mouse-wheel-lowres.c +++ b/src/libinput-plugin-mouse-wheel-lowres.c @@ -54,6 +54,13 @@ wheel_plugin_device_new(struct libinput_plugin *libinput_plugin, libevdev_enable_event_code(libevdev, EV_REL, REL_HWHEEL_HI_RES, NULL); libinput_plugin_enable_device_event_frame(libinput_plugin, device, true); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_REL_WHEEL); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_REL_HWHEEL); + + /* A device may have those disabled via a quirk but we just re-enabled it + * above. Make sure we get those events too to filter them out */ + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_REL_WHEEL_HI_RES); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_REL_HWHEEL_HI_RES); } static void diff --git a/src/libinput-plugin-mouse-wheel.c b/src/libinput-plugin-mouse-wheel.c index 7620f0bd..8981137a 100644 --- a/src/libinput-plugin-mouse-wheel.c +++ b/src/libinput-plugin-mouse-wheel.c @@ -506,6 +506,11 @@ wheel_plugin_device_new(struct libinput_plugin *libinput_plugin, libinput_plugin_enable_device_event_frame(libinput_plugin, device, true); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_REL_WHEEL); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_REL_WHEEL_HI_RES); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_REL_HWHEEL); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_REL_HWHEEL_HI_RES); + struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin); struct plugin_device *pd = wheel_plugin_device_create(libinput_plugin, plugin, device); diff --git a/src/libinput-plugin-tablet-double-tool.c b/src/libinput-plugin-tablet-double-tool.c index eacdc632..ea8ef902 100644 --- a/src/libinput-plugin-tablet-double-tool.c +++ b/src/libinput-plugin-tablet-double-tool.c @@ -339,6 +339,8 @@ double_tool_plugin_device_added(struct libinput_plugin *libinput_plugin, return; libinput_plugin_enable_device_event_frame(libinput_plugin, device, true); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_BTN_TOOL_PEN); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_BTN_TOOL_RUBBER); struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin); struct plugin_device *pd = zalloc(sizeof(*pd)); diff --git a/src/libinput-plugin-tablet-eraser-button.c b/src/libinput-plugin-tablet-eraser-button.c index 00cf399e..c3741e30 100644 --- a/src/libinput-plugin-tablet-eraser-button.c +++ b/src/libinput-plugin-tablet-eraser-button.c @@ -541,6 +541,13 @@ eraser_button_plugin_device_added(struct libinput_plugin *libinput_plugin, return; libinput_plugin_enable_device_event_frame(libinput_plugin, device, true); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_BTN_TOOL_PEN); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_BTN_TOOL_RUBBER); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_BTN_TOUCH); + /* These are the only ones we allow setting the eraser button to */ + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_BTN_STYLUS); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_BTN_STYLUS2); + libinput_plugin_enable_evdev_usage(libinput_plugin, EVDEV_BTN_STYLUS3); struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin); struct plugin_device *pd = zalloc(sizeof(*pd));