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 --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index a3f7dffb..4a2d530c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -89,9 +89,19 @@ and background are the same), the cursor will instead be rendered using the default foreground and background colors, inverted ([#1761][1761]). +* Mouse wheel events now generate `BTN_WHEEL_BACK` and + `BTN_WHEEL_FORWARD` "button presses", instead of `BTN_BACK` and + `BTN_FORWARD`. The default bindings have been updated, and + `scrollback-up-mouse`, `scrollback-down-mouse`, `font-increase` and + `font-decrease` now use the new button names. + + This change allow users to separate physical mouse buttons that + _also_ generates `BTN_BACK` and `BTN_FORWARD`, from wheel scrolling + ([#1763][1763]). [1701]: https://codeberg.org/dnkl/foot/issues/1701 [1761]: https://codeberg.org/dnkl/foot/issues/1761 +[1763]: https://codeberg.org/dnkl/foot/issues/1763 ### Deprecated @@ -118,6 +128,8 @@ foot config has not set any custom cursor colors (i.e. without OSC-12, inverted fg/bg would be used). * Wrong color used when drawing the unfocused, hollow cursor. +* Encoding of `BTN_BACK` and `BTN_FORWARD`, when sending a mouse input + escape sequence to the terminal application. [1694]: https://codeberg.org/dnkl/foot/issues/1694 [1717]: https://codeberg.org/dnkl/foot/issues/1717 -- cgit v1.3