From 1136108c9780eae9fae252a1bca5089f19fcd57d Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 13 Jul 2024 10:24:11 +0200 Subject: 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 --- foot.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'foot.ini') diff --git a/foot.ini b/foot.ini index 23652d5e..7ae9ba1b 100644 --- a/foot.ini +++ b/foot.ini @@ -213,8 +213,10 @@ # \x03=Mod4+c # Map Super+c -> Ctrl+c [mouse-bindings] -# scrollback-up-mouse=BTN_BACK -# scrollback-down-mouse=BTN_FORWARD +# scrollback-up-mouse=BTN_WHEEL_BACK +# scrollback-down-mouse=BTN_WHEEL_FORWARD +# font-increase=Control+BTN_WHEEL_BACK +# font-decrease=Control+BTN_WHEEL_FORWARD # selection-override-modifiers=Shift # primary-paste=BTN_MIDDLE # select-begin=BTN_LEFT -- cgit v1.3