summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-10-26 13:13:34 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-10-26 13:13:34 +0000
commit46c320e927d829b7e39fac777514abf6b2b0c498 (patch)
tree3fdef7c86e7ad5349b6ec116208cf303cd974db8 /usr.bin/tmux
parent4008523fedeab641045ba3f42a88154974c9b962 (diff)
Rename keypad keys to something more useful.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/input-keys.c66
-rw-r--r--usr.bin/tmux/key-string.c34
-rw-r--r--usr.bin/tmux/tmux.h36
-rw-r--r--usr.bin/tmux/tty-keys.c34
4 files changed, 85 insertions, 85 deletions
diff --git a/usr.bin/tmux/input-keys.c b/usr.bin/tmux/input-keys.c
index 2218a36d009..825165450b6 100644
--- a/usr.bin/tmux/input-keys.c
+++ b/usr.bin/tmux/input-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input-keys.c,v 1.5 2009/10/26 13:02:53 nicm Exp $ */
+/* $OpenBSD: input-keys.c,v 1.6 2009/10/26 13:13:33 nicm 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. */
diff --git a/usr.bin/tmux/key-string.c b/usr.bin/tmux/key-string.c
index cba6bb09755..bde8bfc507d 100644
--- a/usr.bin/tmux/key-string.c
+++ b/usr.bin/tmux/key-string.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key-string.c,v 1.8 2009/10/06 07:32:26 nicm Exp $ */
+/* $OpenBSD: key-string.c,v 1.9 2009/10/26 13:13:33 nicm 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
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index 0c149af9785..3e3b745f478 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.147 2009/10/25 21:11:21 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.148 2009/10/26 13:13:33 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -163,23 +163,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. */
diff --git a/usr.bin/tmux/tty-keys.c b/usr.bin/tmux/tty-keys.c
index c229ec42a9f..24444b399fb 100644
--- a/usr.bin/tmux/tty-keys.c
+++ b/usr.bin/tmux/tty-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty-keys.c,v 1.6 2009/10/26 13:02:53 nicm Exp $ */
+/* $OpenBSD: tty-keys.c,v 1.7 2009/10/26 13:13:33 nicm 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);