Skip to content

Commit

Permalink
Handle "SS3" arrow key events
Browse files Browse the repository at this point in the history
  • Loading branch information
walles committed Jun 7, 2023
1 parent 15a90f5 commit daafbcd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions twin/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit daafbcd

Please sign in to comment.