Skip to content

Commit

Permalink
Support linux console F1-F5
Browse files Browse the repository at this point in the history
  • Loading branch information
knz authored and muesli committed Sep 4, 2022
1 parent 127f762 commit 6243433
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions key.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,13 @@ var sequences = map[string]Key{
"\x1b\x1b[7~": {Type: KeyHome, Alt: true}, // urxvt
"\x1b\x1b[8~": {Type: KeyEnd, Alt: true}, // urxvt

// Function keys, Linux console
"\x1b[[A": {Type: KeyF1}, // linux console
"\x1b[[B": {Type: KeyF2}, // linux console
"\x1b[[C": {Type: KeyF3}, // linux console
"\x1b[[D": {Type: KeyF4}, // linux console
"\x1b[[E": {Type: KeyF5}, // linux console

// Function keys, X11
"\x1bOP": {Type: KeyF1}, // vt100
"\x1bOQ": {Type: KeyF2}, // vt100
Expand Down

0 comments on commit 6243433

Please sign in to comment.