[AD] Fix keyboard tables problem (2/n) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
This patch puts the new MacOS X keys before KEY_MODIFIERS and shifts the
modifiers. As I said in my previous message, I think this is transparent for
the library code. The only problem could arise from the keyboard
configuration files, but I grepped the resource/keyboard directory (grep
"key103" ... "key114") and found no occurences.
Applied to mainline.
--
Eric Botcazou
Index: include/allegro/keyboard.h
===================================================================
RCS file: /cvsroot/alleg/allegro/include/allegro/keyboard.h,v
retrieving revision 1.7
diff -u -r1.7 keyboard.h
--- include/allegro/keyboard.h 13 Oct 2003 11:57:38 -0000 1.7
+++ include/allegro/keyboard.h 29 Oct 2003 09:51:40 -0000
@@ -194,26 +194,25 @@
#define KEY_CIRCUMFLEX 100
#define KEY_COLON2 101
#define KEY_KANJI 102
+#define KEY_EQUALS_PAD 103 /* MacOS X */
+#define KEY_BACKQUOTE 104 /* MacOS X */
+#define KEY_SEMICOLON 105 /* MacOS X */
+#define KEY_COMMAND 106 /* MacOS X */
-#define KEY_MODIFIERS 103
+#define KEY_MODIFIERS 107
-#define KEY_LSHIFT 103
-#define KEY_RSHIFT 104
-#define KEY_LCONTROL 105
-#define KEY_RCONTROL 106
-#define KEY_ALT 107
-#define KEY_ALTGR 108
-#define KEY_LWIN 109
-#define KEY_RWIN 110
-#define KEY_MENU 111
-#define KEY_SCRLOCK 112
-#define KEY_NUMLOCK 113
-#define KEY_CAPSLOCK 114
-
-#define KEY_EQUALS_PAD 115
-#define KEY_BACKQUOTE 116
-#define KEY_SEMICOLON 117
-#define KEY_COMMAND 118
+#define KEY_LSHIFT 107
+#define KEY_RSHIFT 108
+#define KEY_LCONTROL 109
+#define KEY_RCONTROL 110
+#define KEY_ALT 111
+#define KEY_ALTGR 112
+#define KEY_LWIN 113
+#define KEY_RWIN 114
+#define KEY_MENU 115
+#define KEY_SCRLOCK 116
+#define KEY_NUMLOCK 117
+#define KEY_CAPSLOCK 118
#define KEY_MAX 119
Index: src/misc/pckeys.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/misc/pckeys.c,v
retrieving revision 1.14
diff -u -r1.14 pckeys.c
--- src/misc/pckeys.c 29 Oct 2003 09:23:27 -0000 1.14
+++ src/misc/pckeys.c 29 Oct 2003 09:51:41 -0000
@@ -173,7 +173,7 @@
/* misc chars */ 27, '`', '-', '=', 8, 9, '[', ']', 13, ';', '\'', '\\', '\\', ',', '.', '/', ' ',
/* controls */ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
/* numpad */ '/', '*', '-', '+', '.', 13,
- /* others */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* others */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* modifiers */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
@@ -190,7 +190,7 @@
/* misc chars */ 27, '`', '-', '=', 8, 9, '[', ']', 13, ';', '\'', '\\', '\\', ',', '.', '/', ' ',
/* controls */ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
/* numpad */ '/', '*', '-', '+', '.', 13,
- /* others */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* others */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* modifiers */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
@@ -207,7 +207,7 @@
/* misc chars */ 27, '~', '_', '+', 8, 9, '{', '}', 13, ':', '"', '|', '|', '<', '>', '?', ' ',
/* controls */ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
/* numpad */ '/', '*', '-', '+', '.', 13,
- /* others */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* others */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* modifiers */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
@@ -224,7 +224,7 @@
/* misc chars */ 27, 2, 2, 2, 127, 127, 2, 2, 10, 2, 2, 2, 2, 2, 2, 2, 2,
/* controls */ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
/* numpad */ 2, 2, 2, 2, 2, 10,
- /* others */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* others */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* modifiers */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};