documented terminal key sequences
This commit is contained in:
28
tim.h
28
tim.h
@@ -598,22 +598,22 @@ static bool parse_input(struct event* restrict e, int n) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct {char s[4]; int k;} key_table[] = {
|
static struct {char s[4]; int k;} key_table[] = {
|
||||||
{"[A" , UP_KEY},
|
{"[A" , UP_KEY}, //
|
||||||
{"[B" , DOWN_KEY},
|
{"[B" , DOWN_KEY}, //
|
||||||
{"[C" , RIGHT_KEY},
|
{"[C" , RIGHT_KEY}, //
|
||||||
{"[D" , LEFT_KEY},
|
{"[D" , LEFT_KEY}, //
|
||||||
{"[2~", INSERT_KEY}, // xterm
|
{"[2~", INSERT_KEY}, //
|
||||||
{"[4h", INSERT_KEY}, //
|
{"[4h", INSERT_KEY}, // st
|
||||||
{"[3~", DELETE_KEY}, // xterm
|
{"[3~", DELETE_KEY}, //
|
||||||
{"[P" , DELETE_KEY}, //
|
{"[P" , DELETE_KEY}, // st
|
||||||
{"[H" , HOME_KEY}, // xterm
|
{"[H" , HOME_KEY}, //
|
||||||
{"[1~", HOME_KEY}, // tmux
|
{"[1~", HOME_KEY}, // rxvt, lxterm, putty, tmux, screen
|
||||||
{"[7~", HOME_KEY}, // rxvt
|
{"[7~", HOME_KEY}, // rxvt
|
||||||
{"[F" , END_KEY}, // xterm
|
{"[F" , END_KEY}, //
|
||||||
{"[4~", END_KEY}, // tmux
|
{"[4~", END_KEY}, // rxvt, lxterm, putty, tmux, screen, st
|
||||||
{"[8~", END_KEY}, // rxvt
|
{"[8~", END_KEY}, // rxvt
|
||||||
{"[5~", PAGEUP_KEY},
|
{"[5~", PAGEUP_KEY}, //
|
||||||
{"[6~", PAGEDOWN_KEY},
|
{"[6~", PAGEDOWN_KEY}, //
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((n == 3 || n == 4) && s[0] == 27) {
|
if ((n == 3 || n == 4) && s[0] == 27) {
|
||||||
|
|||||||
Reference in New Issue
Block a user