summaryrefslogtreecommitdiffstats
path: root/src/newt/native/KeyEvent.h
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2013-05-16 21:33:25 +0200
committerSven Gothel <sgothel@jausoft.com>2013-05-16 21:33:25 +0200
commit86a5460c5052cdab7b9f6294c46a0b4e30dfa260 (patch)
tree5c029a5d847fe6f7856098e5c734dd621cd31c9d /src/newt/native/KeyEvent.h
parent890dabf77593732bd9833350b441a37c60f74d45 (diff)
Fix Bug 723: Remove VK_KP_<Cursor> numpad key-codes, use general VK_<Cursor> key-codes; Respect numpad printable keys; Use keySym for numpad if possible.
- KeyEvent keyCode/keySym values re-ordered! - Remove VK_KP_<Cursor> numpad key-codes, use general VK_<Cursor> key-codes. Numpad cursor keys are not supported on some platforms (Windows), or not configured on most X11 configurations. - Respect numpad printable keys, i.e. don't treat them as non-printable. - Use keySym for numpad if possible. Numpad keys require modifiers, hence X11 and Windows shall return keySym.
Diffstat (limited to 'src/newt/native/KeyEvent.h')
-rw-r--r--src/newt/native/KeyEvent.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/newt/native/KeyEvent.h b/src/newt/native/KeyEvent.h
index 7a63b19ce..a182db973 100644
--- a/src/newt/native/KeyEvent.h
+++ b/src/newt/native/KeyEvent.h
@@ -161,7 +161,7 @@
// Unicode: Non printable controls: [0x7F - 0x9F]
//
-#define J_VK_DELETE ( 0x7FU )
+#define J_VK_SEPARATOR ( 0x7FU )
#define J_VK_NUMPAD0 ( 0x80U )
#define J_VK_NUMPAD1 ( 0x81U )
#define J_VK_NUMPAD2 ( 0x82U )
@@ -173,16 +173,13 @@
#define J_VK_NUMPAD8 ( 0x88U )
#define J_VK_NUMPAD9 ( 0x89U )
#define J_VK_DECIMAL ( 0x8AU )
-#define J_VK_SEPARATOR ( 0x8BU )
-#define J_VK_ADD ( 0x8CU )
-#define J_VK_SUBTRACT ( 0x8DU )
-#define J_VK_MULTIPLY ( 0x8EU )
-#define J_VK_DIVIDE ( 0x8FU )
-#define J_VK_NUM_LOCK ( 0x90U )
-#define J_VK_KP_LEFT ( 0x91U )
-#define J_VK_KP_UP ( 0x92U )
-#define J_VK_KP_RIGHT ( 0x93U )
-#define J_VK_KP_DOWN ( 0x94U )
+#define J_VK_ADD ( 0x8BU )
+#define J_VK_SUBTRACT ( 0x8CU )
+#define J_VK_MULTIPLY ( 0x8DU )
+#define J_VK_DIVIDE ( 0x8EU )
+
+#define J_VK_DELETE ( 0x93U )
+#define J_VK_NUM_LOCK ( 0x94U )
#define J_VK_LEFT ( 0x95U )
#define J_VK_UP ( 0x96U )
#define J_VK_RIGHT ( 0x97U )
@@ -195,7 +192,6 @@
#define J_VK_BEGIN ( 0x9EU )
#define J_VK_STOP ( 0x9FU )
-
//
// Unicode: Printable [0x00A0 - 0xDFFF]
//