diff options
Diffstat (limited to 'input-keys.c')
-rw-r--r-- | input-keys.c | 53 |
1 files changed, 32 insertions, 21 deletions
diff --git a/input-keys.c b/input-keys.c index efddf217..26ab8b92 100644 --- a/input-keys.c +++ b/input-keys.c @@ -1,4 +1,4 @@ -/* $Id: input-keys.c,v 1.21 2009-01-11 23:31:46 nicm Exp $ */ +/* $Id: input-keys.c,v 1.22 2009-01-12 21:47:03 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -37,10 +37,10 @@ struct input_key_ent { struct input_key_ent input_keys[] = { /* Function keys. */ - { KEYC_F1, "\033OP", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, - { KEYC_F2, "\033OQ", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, - { KEYC_F3, "\033OR", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, - { KEYC_F4, "\033OS", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, + { KEYC_F1, "\033OP", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, + { KEYC_F2, "\033OQ", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, + { KEYC_F3, "\033OR", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, + { KEYC_F4, "\033OS", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, { KEYC_F5, "\033[15~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, { KEYC_F6, "\033[17~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, { KEYC_F7, "\033[18~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, @@ -49,24 +49,35 @@ struct input_key_ent input_keys[] = { { KEYC_F10, "\033[21~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, { KEYC_F11, "\033[23~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, { KEYC_F12, "\033[24~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, - { KEYC_IC, "\033[2~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, - { KEYC_DC, "\033[3~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, - { KEYC_HOME, "\033[1~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, - { KEYC_END, "\033[4~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, - { KEYC_NPAGE, "\033[6~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, - { KEYC_PPAGE, "\033[5~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, - { KEYC_BTAB, "\033[Z", INPUTKEY_MODIFIER }, + { KEYC_IC, "\033[2~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, + { KEYC_DC, "\033[3~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, + { KEYC_HOME, "\033[1~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, + { KEYC_END, "\033[4~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, + { KEYC_NPAGE, "\033[6~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, + { KEYC_PPAGE, "\033[5~", INPUTKEY_MODIFIER|INPUTKEY_XTERM }, + { KEYC_BTAB, "\033[Z", INPUTKEY_MODIFIER }, /* Arrow keys. Cursor versions must come first. */ - { KEYC_UP, "\033OA", INPUTKEY_MODIFIER|INPUTKEY_CURSOR }, - { KEYC_DOWN, "\033OB", INPUTKEY_MODIFIER|INPUTKEY_CURSOR }, - { KEYC_LEFT, "\033OD", INPUTKEY_MODIFIER|INPUTKEY_CURSOR }, - { KEYC_RIGHT, "\033OC", INPUTKEY_MODIFIER|INPUTKEY_CURSOR }, - { KEYC_UP, "\033[A", INPUTKEY_MODIFIER }, - { KEYC_DOWN, "\033[B", INPUTKEY_MODIFIER }, - { KEYC_LEFT, "\033[D", INPUTKEY_MODIFIER }, - { KEYC_RIGHT, "\033[C", INPUTKEY_MODIFIER }, - + { KEYC_UP, "\033OA", INPUTKEY_CURSOR }, + { KEYC_DOWN, "\033OB", INPUTKEY_CURSOR }, + { KEYC_RIGHT, "\033OC", INPUTKEY_CURSOR }, + { KEYC_LEFT, "\033OD", INPUTKEY_CURSOR }, + + { KEYC_UP, "\033[A", 0 }, + { KEYC_DOWN, "\033[B", 0 }, + { KEYC_RIGHT, "\033[C", 0 }, + { KEYC_LEFT, "\033[D", 0 }, + + { KEYC_ADDCTL(KEYC_UP), "\033Oa", 0 }, + { KEYC_ADDCTL(KEYC_DOWN), "\033Ob", 0 }, + { KEYC_ADDCTL(KEYC_RIGHT), "\033Oc", 0 }, + { KEYC_ADDCTL(KEYC_LEFT), "\033Od", 0 }, + + { KEYC_ADDSFT(KEYC_UP), "\033[a", 0 }, + { KEYC_ADDSFT(KEYC_DOWN), "\033[b", 0 }, + { KEYC_ADDSFT(KEYC_RIGHT), "\033[c", 0 }, + { KEYC_ADDSFT(KEYC_LEFT), "\033[d", 0 }, + /* Keypad keys. Keypad versions must come first. */ { KEYC_KP0_1, "/", INPUTKEY_KEYPAD }, { KEYC_KP0_2, "*", INPUTKEY_KEYPAD }, |