aboutsummaryrefslogtreecommitdiff
path: root/tty-keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'tty-keys.c')
-rw-r--r--tty-keys.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tty-keys.c b/tty-keys.c
index fc79c89b..33539d15 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -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;