- fixed debug key

This commit is contained in:
Mark Vejvoda
2011-07-05 05:40:14 +00:00
parent 2c80543889
commit 8c99c7e91f
2 changed files with 9 additions and 4 deletions

View File

@@ -947,7 +947,7 @@ char Window::getKey(SDL_keysym keysym,bool skipSpecialKeys) {
bool isKeyPressed(SDLKey compareKey, SDL_KeyboardEvent input,bool modifiersAllowed) {
Uint16 c = SDLK_UNKNOWN;
//if(input.keysym.unicode > 0 && input.keysym.unicode < 0x80) {
if(input.keysym.unicode > 0 && input.keysym.unicode < 0x80) {
if(input.keysym.unicode > 0) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
// When modifiers are pressed the unicode result is wrong
@@ -961,6 +961,11 @@ bool isKeyPressed(SDLKey compareKey, SDL_KeyboardEvent input,bool modifiersAllow
c = input.keysym.unicode;
//c = toupper(c);
}
else if(c == SDLK_QUESTION &&
(input.keysym.mod & KMOD_LSHIFT) == KMOD_LSHIFT ||
(input.keysym.mod & KMOD_RSHIFT) == KMOD_RSHIFT) {
c = input.keysym.unicode;
}
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("In [%s::%s Line: %d] #1 (c & 0xFF) [%d]\n",__FILE__,__FUNCTION__,__LINE__,(c & 0xFF));
}