From 7df2d40e8fa580b1644cad020fb62e42c4cda61b Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 6 Jun 2009 02:06:38 +0000 Subject: [PATCH] - Added a label for the F16 key and mapped the kp= key on a Mac keyboard to the PC98 equivalent so it would be recognized as kp=. (Interestingly, F13- F16 and kp= only generate events when using Raw Input, not when using DirectInput. SVN r1639 (trunk) --- docs/rh-log.txt | 8 +++++++- src/c_bind.cpp | 2 +- src/win32/i_keyboard.cpp | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index bd69cdcc5c..2290e9e5ed 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,10 @@ -June 5, 2009 (Changes by Graf Zahl) +June 5, 2009 +- Added a label for the F16 key and mapped the kp= key on a Mac keyboard to + the PC98 equivalent so it will be identified as kp=. (Interestingly, F13- + F16 and kp= only generate events when using Raw Input, not when using + DirectInput. + +June 5, 2009 (Changes by Graf Zahl) - Added MF6_FORCEPAIN flag that forces the target to go into the pain state regardless of pain chance. - Changed screenblocks CVAR to be settable per game. diff --git a/src/c_bind.cpp b/src/c_bind.cpp index b2912e1adc..01456afb1f 100644 --- a/src/c_bind.cpp +++ b/src/c_bind.cpp @@ -179,7 +179,7 @@ const char *KeyNames[NUM_KEYS] = "kp8", "kp9", "kp-", "kp4", "kp5", "kp6", "kp+", "kp1", //48 "kp2", "kp3", "kp0", "kp.", NULL, NULL, "oem102", "f11", //50 "f12", NULL, NULL, NULL, NULL, NULL, NULL, NULL, //58 - NULL, NULL, NULL, NULL, "f13", "f14", "f15", NULL, //60 + NULL, NULL, NULL, NULL, "f13", "f14", "f15", "f16", //60 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, //68 "kana", NULL, NULL, "abnt_c1", NULL, NULL, NULL, NULL, //70 NULL, "convert", NULL, "noconvert",NULL, "yen", "abnt_c2", NULL, //78 diff --git a/src/win32/i_keyboard.cpp b/src/win32/i_keyboard.cpp index 4669ad359b..a072eb5440 100644 --- a/src/win32/i_keyboard.cpp +++ b/src/win32/i_keyboard.cpp @@ -228,6 +228,10 @@ void FKeyboard::PostKeyEvent(int key, INTBOOL down, bool foreground) key = DIK_LSHIFT; } } + if (key == 0x59) + { // Turn kp= on a Mac keyboard into kp= on a PC98 keyboard. + key = DIK_NUMPADEQUALS; + } // Generate the event, if appropriate. if (down)