aboutsummaryrefslogtreecommitdiff
path: root/input.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-07-13 08:24:11 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-07-13 08:41:10 +0000
commit1136108c9780eae9fae252a1bca5089f19fcd57d (patch)
tree89cc11fabcbb5096fe4117266aa6bc0eedda61fa /input.h
parentchangelog: remove entry for change that hasn't yet been merged (diff)
input: don't map wheel events to BTN_{BACK,FORWARD}
BTN_BACK and BTN_FORWARD are separate buttons. The scroll wheel don't have any button mappings in libinput/wayland, so make up our own defines. This allows us to map them in mouse bindings. Also expose BTN_WHEEL_{LEFT,RIGHT}. These were already defined, and used, internally, to handle wheel tilt events. With this, they can also be used in mouse bindings. Finally, fix encoding used for BTN_{BACK,FORWARD} when sending mouse button events to the client application. Before this, they were mapped to buttons 4/5. But, button 4/5 are for the scroll wheel, and as mentioned above, BTN_{BACK,FORWARD} are not the same as scroll wheel "buttons". Closes #1763
Diffstat (limited to 'input.h')
-rw-r--r--input.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/input.h b/input.h
index 2ea1c6a9..34342bbf 100644
--- a/input.h
+++ b/input.h
@@ -21,6 +21,8 @@
* Mouse buttons are in the range 0x110 - 0x11f, with joystick defines
* starting at 0x120.
*/
+#define BTN_WHEEL_BACK 0x11c
+#define BTN_WHEEL_FORWARD 0x11d
#define BTN_WHEEL_LEFT 0x11e
#define BTN_WHEEL_RIGHT 0x11f