diff options
Diffstat (limited to 'libbb/read_key.c')
-rw-r--r-- | libbb/read_key.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libbb/read_key.c b/libbb/read_key.c index 5dcd19c3f..8d72d2a63 100644 --- a/libbb/read_key.c +++ b/libbb/read_key.c | |||
@@ -40,13 +40,14 @@ int64_t FAST_FUNC read_key(int fd, char *buffer, int timeout) | |||
40 | '[','C' |0x80,KEYCODE_RIGHT , | 40 | '[','C' |0x80,KEYCODE_RIGHT , |
41 | '[','D' |0x80,KEYCODE_LEFT , | 41 | '[','D' |0x80,KEYCODE_LEFT , |
42 | /* ESC [ 1 ; 2 x, where x = A/B/C/D: Shift-<arrow> */ | 42 | /* ESC [ 1 ; 2 x, where x = A/B/C/D: Shift-<arrow> */ |
43 | /* ESC [ 1 ; 3 x, where x = A/B/C/D: Alt-<arrow> */ | 43 | /* ESC [ 1 ; 3 x, where x = A/B/C/D: Alt-<arrow> - implemented below */ |
44 | /* ESC [ 1 ; 4 x, where x = A/B/C/D: Alt-Shift-<arrow> */ | 44 | /* ESC [ 1 ; 4 x, where x = A/B/C/D: Alt-Shift-<arrow> */ |
45 | /* ESC [ 1 ; 5 x, where x = A/B/C/D: Ctrl-<arrow> - implemented below */ | 45 | /* ESC [ 1 ; 5 x, where x = A/B/C/D: Ctrl-<arrow> - implemented below */ |
46 | /* ESC [ 1 ; 6 x, where x = A/B/C/D: Ctrl-Shift-<arrow> */ | 46 | /* ESC [ 1 ; 6 x, where x = A/B/C/D: Ctrl-Shift-<arrow> */ |
47 | '[','H' |0x80,KEYCODE_HOME , /* xterm */ | 47 | '[','H' |0x80,KEYCODE_HOME , /* xterm */ |
48 | /* [ESC] ESC [ [2] H - [Alt-][Shift-]Home */ | ||
49 | '[','F' |0x80,KEYCODE_END , /* xterm */ | 48 | '[','F' |0x80,KEYCODE_END , /* xterm */ |
49 | /* [ESC] ESC [ [2] H - [Alt-][Shift-]Home (End similarly?) */ | ||
50 | /* '[','Z' |0x80,KEYCODE_SHIFT_TAB, */ | ||
50 | '[','1','~' |0x80,KEYCODE_HOME , /* vt100? linux vt? or what? */ | 51 | '[','1','~' |0x80,KEYCODE_HOME , /* vt100? linux vt? or what? */ |
51 | '[','2','~' |0x80,KEYCODE_INSERT , | 52 | '[','2','~' |0x80,KEYCODE_INSERT , |
52 | /* ESC [ 2 ; 3 ~ - Alt-Insert */ | 53 | /* ESC [ 2 ; 3 ~ - Alt-Insert */ |
@@ -86,8 +87,12 @@ int64_t FAST_FUNC read_key(int fd, char *buffer, int timeout) | |||
86 | /* '[','1',';','5','B' |0x80,KEYCODE_CTRL_DOWN , - unused */ | 87 | /* '[','1',';','5','B' |0x80,KEYCODE_CTRL_DOWN , - unused */ |
87 | '[','1',';','5','C' |0x80,KEYCODE_CTRL_RIGHT, | 88 | '[','1',';','5','C' |0x80,KEYCODE_CTRL_RIGHT, |
88 | '[','1',';','5','D' |0x80,KEYCODE_CTRL_LEFT , | 89 | '[','1',';','5','D' |0x80,KEYCODE_CTRL_LEFT , |
90 | /* '[','1',';','3','A' |0x80,KEYCODE_ALT_UP , - unused */ | ||
91 | /* '[','1',';','3','B' |0x80,KEYCODE_ALT_DOWN , - unused */ | ||
92 | '[','1',';','3','C' |0x80,KEYCODE_ALT_RIGHT, | ||
93 | '[','1',';','3','D' |0x80,KEYCODE_ALT_LEFT , | ||
94 | /* '[','3',';','3','~' |0x80,KEYCODE_ALT_DELETE, - unused */ | ||
89 | 0 | 95 | 0 |
90 | /* ESC [ Z - Shift-Tab */ | ||
91 | }; | 96 | }; |
92 | 97 | ||
93 | pfd.fd = fd; | 98 | pfd.fd = fd; |