Add support for ctrl+, ctrl+shift+ for home/end keys
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Raphael 'kena' Poss · committed by Christian Muehlhaeuser · parent 5f76c20 · Browse files · 1 file·+46 added−8 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+46 added−8 removed
- other:+46 added−8 removed
Provenance
- Commit
d9b2889- Tree
5764183- Author
Raphael 'kena' Poss <knz@thaumogen.net>- Committer
Christian Muehlhaeuser <muesli@gmail.com>- Parent
5f76c20
1 file changed+46 added−8 removed
modified:key.go+46 added-8 removed
203 unmodified lines204 KeyCtrlUp205 KeyCtrlDown206 KeyCtrlRight207 KeyCtrlLeft208+ KeyCtrlHome209+ KeyCtrlEnd210 KeyShiftUp211 KeyShiftDown212 KeyShiftRight213 KeyShiftLeft214+ KeyShiftHome215+ KeyShiftEnd216 KeyCtrlShiftUp217 KeyCtrlShiftDown218 KeyCtrlShiftLeft219 KeyCtrlShiftRight220+ KeyCtrlShiftHome221+ KeyCtrlShiftEnd222 KeyF1223 KeyF2224 KeyF3225 KeyF461 unmodified lines287 KeyLeft: "left",288 KeyShiftTab: "shift+tab",289 KeyHome: "home",290 KeyEnd: "end",291+ KeyCtrlHome: "ctrl+home",292+ KeyCtrlEnd: "ctrl+end",293+ KeyShiftHome: "shift+home",294+ KeyShiftEnd: "shift+end",295+ KeyCtrlShiftHome: "ctrl+shift+home",296+ KeyCtrlShiftEnd: "ctrl+shift+end",297 KeyPgUp: "pgup",298 KeyPgDown: "pgdown",299 KeyDelete: "delete",300 KeyInsert: "insert",102 unmodified lines403 "\x1b[6;3~": {Type: KeyPgDown, Alt: true},404 "\x1b\x1b[6~": {Type: KeyPgDown, Alt: true}, // urxvt405 406 "\x1b[1~": {Type: KeyHome},395- "\x1b[H": {Type: KeyHome}, // vt100396- "\x1b[1;3H": {Type: KeyHome, Alt: true}, // vt100407+ "\x1b[H": {Type: KeyHome}, // xterm, lxterm408+ "\x1b[1;3H": {Type: KeyHome, Alt: true}, // xterm, lxterm409+ "\x1b[1;5H": {Type: KeyCtrlHome}, // xterm, lxterm410+ "\x1b[1;7H": {Type: KeyCtrlHome, Alt: true}, // xterm, lxterm411+ "\x1b[1;2H": {Type: KeyShiftHome}, // xterm, lxterm412+ "\x1b[1;4H": {Type: KeyShiftHome, Alt: true}, // xterm, lxterm413+ "\x1b[1;6H": {Type: KeyCtrlShiftHome}, // xterm, lxterm414+ "\x1b[1;8H": {Type: KeyCtrlShiftHome, Alt: true}, // xterm, lxterm415+416 "\x1b[4~": {Type: KeyEnd},398- "\x1b[F": {Type: KeyEnd}, // vt100399- "\x1b[1;3F": {Type: KeyEnd, Alt: true}, // vt100417+ "\x1b[F": {Type: KeyEnd}, // xterm, lxterm418+ "\x1b[1;3F": {Type: KeyEnd, Alt: true}, // xterm, lxterm419+ "\x1b[1;5F": {Type: KeyCtrlEnd}, // xterm, lxterm420+ "\x1b[1;7F": {Type: KeyCtrlEnd, Alt: true}, // xterm, lxterm421+ "\x1b[1;2F": {Type: KeyShiftEnd}, // xterm, lxterm422+ "\x1b[1;4F": {Type: KeyShiftEnd, Alt: true}, // xterm, lxterm423+ "\x1b[1;6F": {Type: KeyCtrlShiftEnd}, // xterm, lxterm424+ "\x1b[1;8F": {Type: KeyCtrlShiftEnd, Alt: true}, // xterm, lxterm425 401- "\x1b[7~": {Type: KeyHome}, // urxvt402- "\x1b\x1b[7~": {Type: KeyHome, Alt: true}, // urxvt403- "\x1b[8~": {Type: KeyEnd}, // urxvt404- "\x1b\x1b[8~": {Type: KeyEnd, Alt: true}, // urxvt426+ "\x1b[7~": {Type: KeyHome}, // urxvt427+ "\x1b\x1b[7~": {Type: KeyHome, Alt: true}, // urxvt428+ "\x1b[7^": {Type: KeyCtrlHome}, // urxvt429+ "\x1b\x1b[7^": {Type: KeyCtrlHome, Alt: true}, // urxvt430+ "\x1b[7$": {Type: KeyShiftHome}, // urxvt431+ "\x1b\x1b[7$": {Type: KeyShiftHome, Alt: true}, // urxvt432+ "\x1b[7@": {Type: KeyCtrlShiftHome}, // urxvt433+ "\x1b\x1b[7@": {Type: KeyCtrlShiftHome, Alt: true}, // urxvt434 435+ "\x1b[8~": {Type: KeyEnd}, // urxvt436+ "\x1b\x1b[8~": {Type: KeyEnd, Alt: true}, // urxvt437+ "\x1b[8^": {Type: KeyCtrlEnd}, // urxvt438+ "\x1b\x1b[8^": {Type: KeyCtrlEnd, Alt: true}, // urxvt439+ "\x1b[8$": {Type: KeyShiftEnd}, // urxvt440+ "\x1b\x1b[8$": {Type: KeyShiftEnd, Alt: true}, // urxvt441+ "\x1b[8@": {Type: KeyCtrlShiftEnd}, // urxvt442+ "\x1b\x1b[8@": {Type: KeyCtrlShiftEnd, Alt: true}, // urxvt443+444 // Function keys, Linux console445 "\x1b[[A": {Type: KeyF1}, // linux console446 "\x1b[[B": {Type: KeyF2}, // linux console447 "\x1b[[C": {Type: KeyF3}, // linux console180 unmodified lines