mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-27 02:23:15 +01:00
Sync OpenBSD patchset 450:
Rename keypad keys to something more useful.
This commit is contained in:
parent
165538b4bd
commit
4f7e669271
66
input-keys.c
66
input-keys.c
@ -1,4 +1,4 @@
|
||||
/* $Id: input-keys.c,v 1.31 2009-10-28 22:51:55 tcunha Exp $ */
|
||||
/* $Id: input-keys.c,v 1.32 2009-10-28 22:53:03 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -89,38 +89,38 @@ struct input_key_ent input_keys[] = {
|
||||
{ KEYC_LEFT, "\033[D", 0 },
|
||||
|
||||
/* Keypad keys. Keypad versions must come first. */
|
||||
{ KEYC_KP0_1, "/", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP0_2, "*", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP0_3, "-", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP1_0, "7", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP1_1, "8", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP1_2, "9", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP1_3, "+", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP2_0, "4", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP2_1, "5", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP2_2, "6", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP3_0, "1", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP3_1, "2", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP3_2, "3", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP3_3, "\n", INPUTKEY_KEYPAD }, /* this can be CRLF too? */
|
||||
{ KEYC_KP4_0, "0", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP4_2, ".", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP0_1, "\033Oo", 0 },
|
||||
{ KEYC_KP0_2, "\033Oj", 0 },
|
||||
{ KEYC_KP0_3, "\033Om", 0 },
|
||||
{ KEYC_KP1_0, "\033Ow", 0 },
|
||||
{ KEYC_KP1_1, "\033Ox", 0 },
|
||||
{ KEYC_KP1_2, "\033Oy", 0 },
|
||||
{ KEYC_KP1_3, "\033Ok", 0 },
|
||||
{ KEYC_KP2_0, "\033Ot", 0 },
|
||||
{ KEYC_KP2_1, "\033Ou", 0 },
|
||||
{ KEYC_KP2_2, "\033Ov", 0 },
|
||||
{ KEYC_KP3_0, "\033Oq", 0 },
|
||||
{ KEYC_KP3_1, "\033Or", 0 },
|
||||
{ KEYC_KP3_2, "\033Os", 0 },
|
||||
{ KEYC_KP3_3, "\033OM", 0 },
|
||||
{ KEYC_KP4_0, "\033Op", 0 },
|
||||
{ KEYC_KP4_2, "\033On", 0 },
|
||||
{ KEYC_KP_SLASH, "/", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_STAR, "*", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_MINUS, "-", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_SEVEN, "7", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_EIGHT, "8", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_NINE, "9", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_PLUS, "+", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_FOUR, "4", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_FIVE, "5", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_SIX, "6", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_ONE, "1", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_TWO, "2", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_THREE, "3", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_ENTER, "\n", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_ZERO, "0", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_PERIOD, ".", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_SLASH, "\033Oo", 0 },
|
||||
{ KEYC_KP_STAR, "\033Oj", 0 },
|
||||
{ KEYC_KP_MINUS, "\033Om", 0 },
|
||||
{ KEYC_KP_SEVEN, "\033Ow", 0 },
|
||||
{ KEYC_KP_EIGHT, "\033Ox", 0 },
|
||||
{ KEYC_KP_NINE, "\033Oy", 0 },
|
||||
{ KEYC_KP_PLUS, "\033Ok", 0 },
|
||||
{ KEYC_KP_FOUR, "\033Ot", 0 },
|
||||
{ KEYC_KP_FIVE, "\033Ou", 0 },
|
||||
{ KEYC_KP_SIX, "\033Ov", 0 },
|
||||
{ KEYC_KP_ONE, "\033Oq", 0 },
|
||||
{ KEYC_KP_TWO, "\033Or", 0 },
|
||||
{ KEYC_KP_THREE, "\033Os", 0 },
|
||||
{ KEYC_KP_ENTER, "\033OM", 0 },
|
||||
{ KEYC_KP_ZERO, "\033Op", 0 },
|
||||
{ KEYC_KP_PERIOD, "\033On", 0 },
|
||||
};
|
||||
|
||||
/* Translate a key code from client into an output key sequence. */
|
||||
|
34
key-string.c
34
key-string.c
@ -1,4 +1,4 @@
|
||||
/* $Id: key-string.c,v 1.24 2009-10-06 14:15:45 tcunha Exp $ */
|
||||
/* $Id: key-string.c,v 1.25 2009-10-28 22:53:03 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -69,22 +69,22 @@ struct {
|
||||
{ "Right", KEYC_RIGHT },
|
||||
|
||||
/* Numeric keypad. */
|
||||
{ "KP/", KEYC_KP0_1 },
|
||||
{ "KP*", KEYC_KP0_2 },
|
||||
{ "KP-", KEYC_KP0_3 },
|
||||
{ "KP7", KEYC_KP1_0 },
|
||||
{ "KP8", KEYC_KP1_1 },
|
||||
{ "KP9", KEYC_KP1_2 },
|
||||
{ "KP+", KEYC_KP1_3 },
|
||||
{ "KP4", KEYC_KP2_0 },
|
||||
{ "KP5", KEYC_KP2_1 },
|
||||
{ "KP6", KEYC_KP2_2 },
|
||||
{ "KP1", KEYC_KP3_0 },
|
||||
{ "KP2", KEYC_KP3_1 },
|
||||
{ "KP3", KEYC_KP3_2 },
|
||||
{ "KPEnter", KEYC_KP3_3 },
|
||||
{ "KP0", KEYC_KP4_0 },
|
||||
{ "KP.", KEYC_KP4_2 },
|
||||
{ "KP/", KEYC_KP_SLASH },
|
||||
{ "KP*", KEYC_KP_STAR },
|
||||
{ "KP-", KEYC_KP_MINUS },
|
||||
{ "KP7", KEYC_KP_SEVEN },
|
||||
{ "KP8", KEYC_KP_EIGHT },
|
||||
{ "KP9", KEYC_KP_NINE },
|
||||
{ "KP+", KEYC_KP_PLUS },
|
||||
{ "KP4", KEYC_KP_FOUR },
|
||||
{ "KP5", KEYC_KP_FIVE },
|
||||
{ "KP6", KEYC_KP_SIX },
|
||||
{ "KP1", KEYC_KP_ONE },
|
||||
{ "KP2", KEYC_KP_TWO },
|
||||
{ "KP3", KEYC_KP_THREE },
|
||||
{ "KPEnter", KEYC_KP_ENTER },
|
||||
{ "KP0", KEYC_KP_ZERO },
|
||||
{ "KP.", KEYC_KP_PERIOD },
|
||||
};
|
||||
|
||||
int
|
||||
|
36
tmux.h
36
tmux.h
@ -1,4 +1,4 @@
|
||||
/* $Id: tmux.h,v 1.485 2009-10-28 22:48:35 tcunha Exp $ */
|
||||
/* $Id: tmux.h,v 1.486 2009-10-28 22:53:03 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -161,23 +161,23 @@ enum key_code {
|
||||
KEYC_LEFT,
|
||||
KEYC_RIGHT,
|
||||
|
||||
/* Numeric keypad. Numbered from top-left, KPY_X. */
|
||||
KEYC_KP0_1,
|
||||
KEYC_KP0_2,
|
||||
KEYC_KP0_3,
|
||||
KEYC_KP1_0,
|
||||
KEYC_KP1_1,
|
||||
KEYC_KP1_2,
|
||||
KEYC_KP1_3,
|
||||
KEYC_KP2_0,
|
||||
KEYC_KP2_1,
|
||||
KEYC_KP2_2,
|
||||
KEYC_KP3_0,
|
||||
KEYC_KP3_1,
|
||||
KEYC_KP3_2,
|
||||
KEYC_KP3_3,
|
||||
KEYC_KP4_0,
|
||||
KEYC_KP4_2,
|
||||
/* Numeric keypad. */
|
||||
KEYC_KP_SLASH,
|
||||
KEYC_KP_STAR,
|
||||
KEYC_KP_MINUS,
|
||||
KEYC_KP_SEVEN,
|
||||
KEYC_KP_EIGHT,
|
||||
KEYC_KP_NINE,
|
||||
KEYC_KP_PLUS,
|
||||
KEYC_KP_FOUR,
|
||||
KEYC_KP_FIVE,
|
||||
KEYC_KP_SIX,
|
||||
KEYC_KP_ONE,
|
||||
KEYC_KP_TWO,
|
||||
KEYC_KP_THREE,
|
||||
KEYC_KP_ENTER,
|
||||
KEYC_KP_ZERO,
|
||||
KEYC_KP_PERIOD,
|
||||
};
|
||||
|
||||
/* Termcap codes. */
|
||||
|
34
tty-keys.c
34
tty-keys.c
@ -1,4 +1,4 @@
|
||||
/* $Id: tty-keys.c,v 1.32 2009-10-28 22:51:55 tcunha Exp $ */
|
||||
/* $Id: tty-keys.c,v 1.33 2009-10-28 22:53:03 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -101,22 +101,22 @@ struct tty_key_ent tty_keys[] = {
|
||||
* mode. Translation of numbers mode/applications mode is done in
|
||||
* input-keys.c.
|
||||
*/
|
||||
{ 0, "\033Oo", KEYC_KP0_1, TTYKEY_RAW },
|
||||
{ 0, "\033Oj", KEYC_KP0_2, TTYKEY_RAW },
|
||||
{ 0, "\033Om", KEYC_KP0_3, TTYKEY_RAW },
|
||||
{ 0, "\033Ow", KEYC_KP1_0, TTYKEY_RAW },
|
||||
{ 0, "\033Ox", KEYC_KP1_1, TTYKEY_RAW },
|
||||
{ 0, "\033Oy", KEYC_KP1_2, TTYKEY_RAW },
|
||||
{ 0, "\033Ok", KEYC_KP1_3, TTYKEY_RAW },
|
||||
{ 0, "\033Ot", KEYC_KP2_0, TTYKEY_RAW },
|
||||
{ 0, "\033Ou", KEYC_KP2_1, TTYKEY_RAW },
|
||||
{ 0, "\033Ov", KEYC_KP2_2, TTYKEY_RAW },
|
||||
{ 0, "\033Oq", KEYC_KP3_0, TTYKEY_RAW },
|
||||
{ 0, "\033Or", KEYC_KP3_1, TTYKEY_RAW },
|
||||
{ 0, "\033Os", KEYC_KP3_2, TTYKEY_RAW },
|
||||
{ 0, "\033OM", KEYC_KP3_3, TTYKEY_RAW },
|
||||
{ 0, "\033Op", KEYC_KP4_0, TTYKEY_RAW },
|
||||
{ 0, "\033On", KEYC_KP4_2, TTYKEY_RAW },
|
||||
{ 0, "\033Oo", KEYC_KP_SLASH, TTYKEY_RAW },
|
||||
{ 0, "\033Oj", KEYC_KP_STAR, TTYKEY_RAW },
|
||||
{ 0, "\033Om", KEYC_KP_MINUS, TTYKEY_RAW },
|
||||
{ 0, "\033Ow", KEYC_KP_SEVEN, TTYKEY_RAW },
|
||||
{ 0, "\033Ox", KEYC_KP_EIGHT, TTYKEY_RAW },
|
||||
{ 0, "\033Oy", KEYC_KP_NINE, TTYKEY_RAW },
|
||||
{ 0, "\033Ok", KEYC_KP_PLUS, TTYKEY_RAW },
|
||||
{ 0, "\033Ot", KEYC_KP_FOUR, TTYKEY_RAW },
|
||||
{ 0, "\033Ou", KEYC_KP_FIVE, TTYKEY_RAW },
|
||||
{ 0, "\033Ov", KEYC_KP_SIX, TTYKEY_RAW },
|
||||
{ 0, "\033Oq", KEYC_KP_ONE, TTYKEY_RAW },
|
||||
{ 0, "\033Or", KEYC_KP_TWO, TTYKEY_RAW },
|
||||
{ 0, "\033Os", KEYC_KP_THREE, TTYKEY_RAW },
|
||||
{ 0, "\033OM", KEYC_KP_ENTER, TTYKEY_RAW },
|
||||
{ 0, "\033Op", KEYC_KP_ZERO, TTYKEY_RAW },
|
||||
{ 0, "\033On", KEYC_KP_PERIOD, TTYKEY_RAW },
|
||||
};
|
||||
|
||||
RB_GENERATE(tty_keys, tty_key, entry, tty_keys_cmp);
|
||||
|
Loading…
Reference in New Issue
Block a user