1
1
mirror of https://github.com/walles/moar.git synced 2024-10-05 16:07:54 +03:00

Handle "SS3" arrow key events

Ref:
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-C1-_8-Bit_-Control-Characters

Fixes #138
This commit is contained in:
Johan Walles 2023-06-07 19:49:13 +02:00
parent 15a90f5f77
commit daafbcdac4

View File

@ -51,6 +51,12 @@ var escapeSequenceToKeyCode = map[string]KeyCode{
"\x1b[C": KeyRight,
"\x1b[D": KeyLeft,
// Ref: https://github.com/walles/moar/issues/138#issuecomment-1579199274
"\x1bOA": KeyUp,
"\x1bOB": KeyDown,
"\x1bOC": KeyRight,
"\x1bOD": KeyLeft,
"\x1b\x1b[A": KeyAltUp, // Alt + up arrow
"\x1b\x1b[B": KeyAltDown, // Alt + down arrow
"\x1b\x1b[C": KeyAltRight, // Alt + right arrow