Fixed bug #743
The arrow keys and keypad arrow keys have almost the same scancodes! --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404456
This commit is contained in:
parent
edb477343d
commit
7bf66f3583
2 changed files with 11 additions and 5 deletions
|
@ -73,4 +73,5 @@
|
|||
#define VK_APOSTROPHE 0xDE
|
||||
#define VK_BACKTICK 0xDF
|
||||
#define VK_OEM_102 0xE2
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
@ -84,11 +84,16 @@ RemapVKEY(WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
}
|
||||
|
||||
/* Keypad keys are a little trickier, we always scan for them. */
|
||||
for (i = 0; i < SDL_arraysize(keypad_scancodes); ++i) {
|
||||
if (scancode == keypad_scancodes[i]) {
|
||||
wParam = VK_NUMPAD0 + i;
|
||||
break;
|
||||
/* Keypad keys are a little trickier, we always scan for them.
|
||||
Keypad arrow keys have the same scancode as normal arrow keys,
|
||||
except they don't have the extended bit (0x1000000) set.
|
||||
*/
|
||||
if (!(lParam & 0x1000000)) {
|
||||
for (i = 0; i < SDL_arraysize(keypad_scancodes); ++i) {
|
||||
if (scancode == keypad_scancodes[i]) {
|
||||
wParam = VK_NUMPAD0 + i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue