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.
This commit is contained in:
parent
0ade2e6268
commit
bda4877b5f
2 changed files with 5 additions and 3 deletions
|
|
@ -263,6 +263,9 @@ static MouseShortcut mshortcuts[] = {
|
|||
#if SCROLLBACK_MOUSE_PATCH
|
||||
{ ShiftMask, Button4, kscrollup, {.i = 1} },
|
||||
{ ShiftMask, Button5, kscrolldown, {.i = 1} },
|
||||
#else
|
||||
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
|
||||
{ ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
|
||||
#endif // SCROLLBACK_MOUSE_PATCH
|
||||
#if SCROLLBACK_MOUSE_ALTSCREEN_PATCH
|
||||
{ XK_NO_MOD, Button4, kscrollup, {.i = 1} },
|
||||
|
|
@ -271,7 +274,6 @@ static MouseShortcut mshortcuts[] = {
|
|||
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
|
||||
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
|
||||
#endif // SCROLLBACK_MOUSE_ALTSCREEN_PATCH
|
||||
|
||||
};
|
||||
|
||||
#if SCROLLBACK_MOUSE_ALTSCREEN_PATCH
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue