summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-09-07 11:55:28 +0000
committerrubidium <rubidium@openttd.org>2008-09-07 11:55:28 +0000
commit3b7ffcf7593ad1339845ee3c8abbcd958102ef6e (patch)
tree3b4c9cb6f864efcc8bebde728043914fdbf6e6fe
parent9474db5cb6c4b9db2f7b68d1dda1a523305282f1 (diff)
downloadopenttd-3b7ffcf7593ad1339845ee3c8abbcd958102ef6e.tar.xz
(svn r14260) -Fix [FS#2277]: merge keycode for "normal" 0-9 keys and keypad 0-9 keys so people don't get confused that the keypad doesn't work as expected.
-rw-r--r--src/gfx_type.h10
-rw-r--r--src/video/cocoa/event.mm20
-rw-r--r--src/video/sdl_v.cpp2
-rw-r--r--src/video/win32_v.cpp2
4 files changed, 12 insertions, 22 deletions
diff --git a/src/gfx_type.h b/src/gfx_type.h
index 7006fa967..039191a75 100644
--- a/src/gfx_type.h
+++ b/src/gfx_type.h
@@ -74,16 +74,6 @@ enum WindowKeyCodes {
* a-z are mapped to 97-122 */
/* Numerical keyboard */
- WKC_NUM_0 = 128,
- WKC_NUM_1 = 129,
- WKC_NUM_2 = 130,
- WKC_NUM_3 = 131,
- WKC_NUM_4 = 132,
- WKC_NUM_5 = 133,
- WKC_NUM_6 = 134,
- WKC_NUM_7 = 135,
- WKC_NUM_8 = 136,
- WKC_NUM_9 = 137,
WKC_NUM_DIV = 138,
WKC_NUM_MUL = 139,
WKC_NUM_MINUS = 140,
diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm
index a196ca4b0..a9273deb7 100644
--- a/src/video/cocoa/event.mm
+++ b/src/video/cocoa/event.mm
@@ -243,16 +243,16 @@ static const VkMapping _vk_mapping[] = {
AS(QZ_F12, WKC_F12),
/* Numeric part */
- AS(QZ_KP0, WKC_NUM_0),
- AS(QZ_KP1, WKC_NUM_1),
- AS(QZ_KP2, WKC_NUM_2),
- AS(QZ_KP3, WKC_NUM_3),
- AS(QZ_KP4, WKC_NUM_4),
- AS(QZ_KP5, WKC_NUM_5),
- AS(QZ_KP6, WKC_NUM_6),
- AS(QZ_KP7, WKC_NUM_7),
- AS(QZ_KP8, WKC_NUM_8),
- AS(QZ_KP9, WKC_NUM_9),
+ AS(QZ_KP0, '0'),
+ AS(QZ_KP1, '1'),
+ AS(QZ_KP2, '2'),
+ AS(QZ_KP3, '3'),
+ AS(QZ_KP4, '4'),
+ AS(QZ_KP5, '5'),
+ AS(QZ_KP6, '6'),
+ AS(QZ_KP7, '7'),
+ AS(QZ_KP8, '8'),
+ AS(QZ_KP9, '9'),
AS(QZ_KP_DIVIDE, WKC_NUM_DIV),
AS(QZ_KP_MULTIPLY, WKC_NUM_MUL),
AS(QZ_KP_MINUS, WKC_NUM_MINUS),
diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp
index 4ccf90abe..3b38e991c 100644
--- a/src/video/sdl_v.cpp
+++ b/src/video/sdl_v.cpp
@@ -270,7 +270,7 @@ static const VkMapping _vk_mapping[] = {
AM(SDLK_F1, SDLK_F12, WKC_F1, WKC_F12),
/* Numeric part. */
- AM(SDLK_KP0, SDLK_KP9, WKC_NUM_0, WKC_NUM_9),
+ AM(SDLK_KP0, SDLK_KP9, '0', '9'),
AS(SDLK_KP_DIVIDE, WKC_NUM_DIV),
AS(SDLK_KP_MULTIPLY, WKC_NUM_MUL),
AS(SDLK_KP_MINUS, WKC_NUM_MINUS),
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index 9f5c32045..6eb9a0fc6 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -106,7 +106,7 @@ static const VkMapping _vk_mapping[] = {
AM(VK_F1, VK_F12, WKC_F1, WKC_F12),
/* Numeric part */
- AM(VK_NUMPAD0, VK_NUMPAD9, WKC_NUM_0, WKC_NUM_9),
+ AM(VK_NUMPAD0, VK_NUMPAD9, '0', '9'),
AS(VK_DIVIDE, WKC_NUM_DIV),
AS(VK_MULTIPLY, WKC_NUM_MUL),
AS(VK_SUBTRACT, WKC_NUM_MINUS),