commit bda9c9ffa645ee5e4b2507474ebfa1c5efb889b2 from: k0ga via: Hiltjo Posthuma date: Sat May 16 10:37:14 2020 UTC Make shift+wheel behaves as shift+Prev/Next St uses a very good hack where mouse wheel genereates ^Y and ^E, that are the same keys that less and vi uses for backward and fordward scrolling. Scroll, as many terminal emulators, use shift+Prev/Next for scrolling, but it is also using ^E and ^Y for scroling, characters that are reserved in the POSIX shell in emacs mode for end of line and yanking, making scroll unsable in st. This patch adds a new hack, making shift+wheel returning the same sequences than shift+Prev/Next, meaning that scroll or any other similar program will not be able to differentiate between them. commit - 045a0fab4f80b57f4a982ae6bc5f33fe21d66111 commit + bda9c9ffa645ee5e4b2507474ebfa1c5efb889b2 blob - fdbacfdbf02d5e541fdc523f1dc0298cb3053ed0 blob + 293e00c4284d411fd80bbe9a1f3cd437068a57bd --- config.def.h +++ config.def.h @@ -171,7 +171,9 @@ static uint forcemousemod = ShiftMask; static MouseShortcut mshortcuts[] = { /* mask button function argument release */ { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, + { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, + { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} }, { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, };