=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty-keys.c,v retrieving revision 1.25 retrieving revision 1.26 diff -c -r1.25 -r1.26 *** src/usr.bin/tmux/tty-keys.c 2009/11/30 16:44:03 1.25 --- src/usr.bin/tmux/tty-keys.c 2009/12/01 07:59:40 1.26 *************** *** 1,4 **** ! /* $OpenBSD: tty-keys.c,v 1.25 2009/11/30 16:44:03 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty-keys.c,v 1.26 2009/12/01 07:59:40 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 453,466 **** goto handle_key; } ! /* Look for matching key string and return if found. */ ! tk = tty_keys_find(tty, buf + 1, len - 1, &size); ! if (tk != NULL) { ! key = tk->key; ! goto found_key; ! } ! ! /* Not found. Is this a mouse key press? */ switch (tty_keys_mouse(buf, len, &size, &mouse)) { case 0: /* yes */ evbuffer_drain(tty->event->input, size); --- 453,459 ---- goto handle_key; } ! /* Is this a mouse key press? */ switch (tty_keys_mouse(buf, len, &size, &mouse)) { case 0: /* yes */ evbuffer_drain(tty->event->input, size); *************** *** 472,478 **** goto partial_key; } ! /* Not found. Try to parse a key with an xterm-style modifier. */ switch (xterm_keys_find(buf, len, &size, &key)) { case 0: /* found */ evbuffer_drain(tty->event->input, size); --- 465,471 ---- goto partial_key; } ! /* Try to parse a key with an xterm-style modifier. */ switch (xterm_keys_find(buf, len, &size, &key)) { case 0: /* found */ evbuffer_drain(tty->event->input, size); *************** *** 481,486 **** --- 474,486 ---- break; case 1: goto partial_key; + } + + /* Look for matching key string and return if found. */ + tk = tty_keys_find(tty, buf + 1, len - 1, &size); + if (tk != NULL) { + key = tk->key; + goto found_key; } /* Skip the escape. */