Mercurial > sdl-ios-xcode
comparison src/video/win32/SDL_win32events.c @ 4561:e4b2b7207f79
Fixed remapping the Delete key and detecting the keypad Delete key.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 20 Jul 2010 23:59:16 -0700 |
parents | 95352c671a6e |
children | e2d46c5c7483 |
comparison
equal
deleted
inserted
replaced
4560:95352c671a6e | 4561:e4b2b7207f79 |
---|---|
81 /* Keypad keys are a little trickier, we always scan for them. | 81 /* Keypad keys are a little trickier, we always scan for them. |
82 Keypad arrow keys have the same scancode as normal arrow keys, | 82 Keypad arrow keys have the same scancode as normal arrow keys, |
83 except they don't have the extended bit (0x1000000) set. | 83 except they don't have the extended bit (0x1000000) set. |
84 */ | 84 */ |
85 if (!(lParam & 0x1000000)) { | 85 if (!(lParam & 0x1000000)) { |
86 for (i = 0; i < SDL_arraysize(keypad_scancodes); ++i) { | 86 if (wParam == VK_DELETE) { |
87 if (scancode == keypad_scancodes[i]) { | 87 wParam = VK_DECIMAL; |
88 wParam = VK_NUMPAD0 + i; | 88 } else { |
89 break; | 89 for (i = 0; i < SDL_arraysize(keypad_scancodes); ++i) { |
90 if (scancode == keypad_scancodes[i]) { | |
91 wParam = VK_NUMPAD0 + i; | |
92 break; | |
93 } | |
90 } | 94 } |
91 } | 95 } |
92 } | 96 } |
93 | 97 |
94 return wParam; | 98 return wParam; |