mirror of
https://github.com/tmux/tmux.git
synced 2024-12-24 01:58:46 +00:00
Sync OpenBSD patchset 562:
Output the right keys for application and number keypad modes (they were the wrong way round).
This commit is contained in:
parent
5f366e6d54
commit
635d36f928
66
input-keys.c
66
input-keys.c
@ -1,4 +1,4 @@
|
||||
/* $Id: input-keys.c,v 1.42 2009-11-10 23:32:53 tcunha Exp $ */
|
||||
/* $Id: input-keys.c,v 1.43 2009-11-28 14:41:17 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -98,39 +98,39 @@ struct input_key_ent input_keys[] = {
|
||||
{ KEYC_LEFT, "\033[D", 0 },
|
||||
|
||||
/* Keypad keys. Keypad versions must come first. */
|
||||
{ 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", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_STAR, "\033Oj", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_MINUS, "\033Om", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_SEVEN, "\033Ow", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_EIGHT, "\033Ox", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_NINE, "\033Oy", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_PLUS, "\033Ok", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_FOUR, "\033Ot", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_FIVE, "\033Ou", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_SIX, "\033Ov", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_ONE, "\033Oq", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_TWO, "\033Or", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_THREE, "\033Os", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_ENTER, "\033OM", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_ZERO, "\033Op", INPUTKEY_KEYPAD },
|
||||
{ KEYC_KP_PERIOD, "\033On", 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 },
|
||||
{ KEYC_KP_SLASH, "/", 0 },
|
||||
{ KEYC_KP_STAR, "*", 0 },
|
||||
{ KEYC_KP_MINUS, "-", 0 },
|
||||
{ KEYC_KP_SEVEN, "7", 0 },
|
||||
{ KEYC_KP_EIGHT, "8", 0 },
|
||||
{ KEYC_KP_NINE, "9", 0 },
|
||||
{ KEYC_KP_PLUS, "+", 0 },
|
||||
{ KEYC_KP_FOUR, "4", 0 },
|
||||
{ KEYC_KP_FIVE, "5", 0 },
|
||||
{ KEYC_KP_SIX, "6", 0 },
|
||||
{ KEYC_KP_ONE, "1", 0 },
|
||||
{ KEYC_KP_TWO, "2", 0 },
|
||||
{ KEYC_KP_THREE, "3", 0 },
|
||||
{ KEYC_KP_ENTER, "\n", 0 },
|
||||
{ KEYC_KP_ZERO, "0", 0 },
|
||||
{ KEYC_KP_PERIOD, ".", 0 },
|
||||
};
|
||||
|
||||
/* Translate a key code into an output key sequence. */
|
||||
|
4
tmux.h
4
tmux.h
@ -1,4 +1,4 @@
|
||||
/* $Id: tmux.h,v 1.522 2009-11-19 22:37:04 tcunha Exp $ */
|
||||
/* $Id: tmux.h,v 1.523 2009-11-28 14:41:17 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -526,7 +526,7 @@ struct mode_key_table {
|
||||
#define MODE_CURSOR 0x1
|
||||
#define MODE_INSERT 0x2
|
||||
#define MODE_KCURSOR 0x4
|
||||
#define MODE_KKEYPAD 0x8
|
||||
#define MODE_KKEYPAD 0x8 /* set = application, clear = number */
|
||||
#define MODE_MOUSE 0x10
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user