mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-26 22:44:30 -04:00
allow separate key binding for the numerics keypad (#1148)
* allow separate key binding for the numerics keypad Fixes #1147 * bring back some sub-128 key codes * abstract HOME key in default config
This commit is contained in:
parent
5904a4edfd
commit
60b2c31189
@ -31,18 +31,6 @@
|
||||
#define KEY_ESCAPE 27
|
||||
#define KEY_ENTER 13
|
||||
#define KEY_TAB 9
|
||||
#define KEY_F1 (0x80+0x3b)
|
||||
#define KEY_F2 (0x80+0x3c)
|
||||
#define KEY_F3 (0x80+0x3d)
|
||||
#define KEY_F4 (0x80+0x3e)
|
||||
#define KEY_F5 (0x80+0x3f)
|
||||
#define KEY_F6 (0x80+0x40)
|
||||
#define KEY_F7 (0x80+0x41)
|
||||
#define KEY_F8 (0x80+0x42)
|
||||
#define KEY_F9 (0x80+0x43)
|
||||
#define KEY_F10 (0x80+0x44)
|
||||
#define KEY_F11 (0x80+0x57)
|
||||
#define KEY_F12 (0x80+0x58)
|
||||
|
||||
#define KEY_BACKSPACE 0x7f
|
||||
#define KEY_PAUSE 0xff
|
||||
@ -50,44 +38,58 @@
|
||||
#define KEY_EQUALS 0x3d
|
||||
#define KEY_MINUS 0x2d
|
||||
|
||||
#define KEY_RSHIFT (0x80+0x36)
|
||||
#define KEY_RCTRL (0x80+0x1d)
|
||||
#define KEY_RALT (0x80+0x38)
|
||||
enum {
|
||||
|
||||
#define KEY_LALT KEY_RALT
|
||||
// Keys without character representations
|
||||
|
||||
// new keys:
|
||||
KEY_F1 = 0x80,
|
||||
KEY_F2,
|
||||
KEY_F3,
|
||||
KEY_F4,
|
||||
KEY_F5,
|
||||
KEY_F6,
|
||||
KEY_F7,
|
||||
KEY_F8,
|
||||
KEY_F9,
|
||||
KEY_F10,
|
||||
KEY_F11,
|
||||
KEY_F12,
|
||||
|
||||
#define KEY_CAPSLOCK (0x80+0x3a)
|
||||
#define KEY_NUMLOCK (0x80+0x45)
|
||||
#define KEY_SCRLCK (0x80+0x46)
|
||||
#define KEY_PRTSCR (0x80+0x59)
|
||||
KEY_RSHIFT,
|
||||
KEY_RCTRL,
|
||||
KEY_RALT,
|
||||
KEY_LALT = KEY_RALT,
|
||||
KEY_CAPSLOCK,
|
||||
KEY_NUMLOCK,
|
||||
KEY_SCRLCK,
|
||||
KEY_PRTSCR,
|
||||
KEY_HOME,
|
||||
KEY_END,
|
||||
KEY_PGUP,
|
||||
KEY_PGDN,
|
||||
KEY_INS,
|
||||
KEY_DEL,
|
||||
|
||||
#define KEY_HOME (0x80+0x47)
|
||||
#define KEY_END (0x80+0x4f)
|
||||
#define KEY_PGUP (0x80+0x49)
|
||||
#define KEY_PGDN (0x80+0x51)
|
||||
#define KEY_INS (0x80+0x52)
|
||||
#define KEY_DEL (0x80+0x53)
|
||||
// Keys on the numerics keypad
|
||||
|
||||
#define KEYP_0 KEY_INS
|
||||
#define KEYP_1 KEY_END
|
||||
#define KEYP_2 KEY_DOWNARROW
|
||||
#define KEYP_3 KEY_PGDN
|
||||
#define KEYP_4 KEY_LEFTARROW
|
||||
#define KEYP_5 (0x80+0x4c)
|
||||
#define KEYP_6 KEY_RIGHTARROW
|
||||
#define KEYP_7 KEY_HOME
|
||||
#define KEYP_8 KEY_UPARROW
|
||||
#define KEYP_9 KEY_PGUP
|
||||
|
||||
#define KEYP_DIVIDE '/'
|
||||
#define KEYP_PLUS '+'
|
||||
#define KEYP_MINUS '-'
|
||||
#define KEYP_MULTIPLY '*'
|
||||
#define KEYP_PERIOD 0
|
||||
#define KEYP_EQUALS KEY_EQUALS
|
||||
#define KEYP_ENTER KEY_ENTER
|
||||
KEYP_0,
|
||||
KEYP_1,
|
||||
KEYP_2,
|
||||
KEYP_3,
|
||||
KEYP_4,
|
||||
KEYP_5,
|
||||
KEYP_6,
|
||||
KEYP_7,
|
||||
KEYP_8,
|
||||
KEYP_9,
|
||||
KEYP_DIVIDE,
|
||||
KEYP_PLUS,
|
||||
KEYP_MINUS,
|
||||
KEYP_MULTIPLY,
|
||||
KEYP_PERIOD,
|
||||
KEYP_EQUALS = KEY_EQUALS,
|
||||
KEYP_ENTER = KEY_ENTER,
|
||||
};
|
||||
|
||||
#define SCANCODE_TO_KEYS_ARRAY { \
|
||||
0, 0, 0, 0, 'a', /* 0-9 */ \
|
||||
|
@ -304,7 +304,22 @@ static const struct
|
||||
{ KEY_INS, "insert" },
|
||||
{ KEY_PAUSE, "pause" },
|
||||
{ KEY_DEL, "del" },
|
||||
{ KEY_PRTSCR, "prtscr" }
|
||||
{ KEY_PRTSCR, "prtscr" },
|
||||
{ KEYP_0, "num0" },
|
||||
{ KEYP_1, "num1" },
|
||||
{ KEYP_2, "num2" },
|
||||
{ KEYP_3, "num3" },
|
||||
{ KEYP_4, "num4" },
|
||||
{ KEYP_5, "num5" },
|
||||
{ KEYP_6, "num6" },
|
||||
{ KEYP_7, "num7" },
|
||||
{ KEYP_8, "num8" },
|
||||
{ KEYP_9, "num9" },
|
||||
{ KEYP_DIVIDE, "num/" },
|
||||
{ KEYP_PLUS, "num+" },
|
||||
{ KEYP_MINUS, "num-" },
|
||||
{ KEYP_MULTIPLY, "num*" },
|
||||
{ KEYP_PERIOD, "num." },
|
||||
};
|
||||
|
||||
static const struct
|
||||
|
@ -1906,7 +1906,7 @@ default_t defaults[] = {
|
||||
NULL, NULL,
|
||||
{0}, {UL,UL}, input, ss_keys, wad_no,
|
||||
"shortcut key to enter setup menu",
|
||||
input_setup, { {input_type_key, 199} }
|
||||
input_setup, { {input_type_key, KEY_HOME} }
|
||||
},
|
||||
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user