mirror of
https://github.com/tmate-io/tmate.git
synced 2025-02-02 19:39:32 +01:00
Process ^[ as meta when a partial key is found.
This commit is contained in:
parent
43fb9835fa
commit
e2295014d9
@ -82,6 +82,13 @@ const struct tty_default_key_raw tty_default_raw_keys[] = {
|
||||
{ "\033[C", KEYC_RIGHT },
|
||||
{ "\033[D", KEYC_LEFT },
|
||||
|
||||
/* Other (xterm) "cursor" keys. */
|
||||
{ "\033OH", KEYC_HOME },
|
||||
{ "\033OF", KEYC_END },
|
||||
|
||||
{ "\033[H", KEYC_HOME },
|
||||
{ "\033[F", KEYC_END },
|
||||
|
||||
/* rxvt-style arrow + modifier keys. */
|
||||
{ "\033Oa", KEYC_UP|KEYC_CTRL },
|
||||
{ "\033Ob", KEYC_DOWN|KEYC_CTRL },
|
||||
@ -491,6 +498,7 @@ tty_keys_next(struct tty *tty)
|
||||
goto complete_key;
|
||||
}
|
||||
|
||||
first_key:
|
||||
/* Is this a meta key? */
|
||||
if (len >= 2 && buf[0] == '\033') {
|
||||
if (buf[1] != '\033') {
|
||||
@ -511,7 +519,6 @@ tty_keys_next(struct tty *tty)
|
||||
}
|
||||
}
|
||||
|
||||
first_key:
|
||||
/* No key found, take first. */
|
||||
key = (u_char) *buf;
|
||||
size = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user