From ce7562705e8adb9a8b567da10ae0d9d8df646d7d Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 6 Apr 2012 23:14:21 +0200 Subject: win32: support key modifiers (shift, ctrl, alt) Support for this is rather simple, and some combinations of modifiers and keys don't work. For example, Ctrl+Alt+character is not supported, because Windows doesn't emit a WM_CHAR in this case. Also add support for the pause and print screen keys. Remove the pointless KEY_CTRL translation. Remove KEY_CTRL altogether, because it was not clear what it was actually supposed to mean. --- input/keycodes.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'input') diff --git a/input/keycodes.h b/input/keycodes.h index 84b41a3e89..c86a4bc138 100644 --- a/input/keycodes.h +++ b/input/keycodes.h @@ -30,16 +30,15 @@ #define KEY_TAB 9 /* Control keys */ -#define KEY_CTRL (MP_KEY_BASE) -#define KEY_BACKSPACE (KEY_CTRL+0) -#define KEY_DELETE (KEY_CTRL+1) -#define KEY_INSERT (KEY_CTRL+2) -#define KEY_HOME (KEY_CTRL+3) -#define KEY_END (KEY_CTRL+4) -#define KEY_PAGE_UP (KEY_CTRL+5) -#define KEY_PAGE_DOWN (KEY_CTRL+6) -#define KEY_ESC (KEY_CTRL+7) -#define KEY_PRINT (KEY_CTRL+8) +#define KEY_BACKSPACE (MP_KEY_BASE+0) +#define KEY_DELETE (MP_KEY_BASE+1) +#define KEY_INSERT (MP_KEY_BASE+2) +#define KEY_HOME (MP_KEY_BASE+3) +#define KEY_END (MP_KEY_BASE+4) +#define KEY_PAGE_UP (MP_KEY_BASE+5) +#define KEY_PAGE_DOWN (MP_KEY_BASE+6) +#define KEY_ESC (MP_KEY_BASE+7) +#define KEY_PRINT (MP_KEY_BASE+8) /* Control keys short name */ #define KEY_BS KEY_BACKSPACE -- cgit v1.2.3