diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index 9fad566a7..22a1e5111 100644 --- a/source/glest_game/game/game.cpp +++ b/source/glest_game/game/game.cpp @@ -1303,7 +1303,7 @@ void Game::keyDown(char key) { if(chatManager.getEditEnabled() == false) { SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] key = [%d - %c]\n",__FILE__,__FUNCTION__,__LINE__,key,key); - if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("In [%s::%s Line: %d] key = [%d - %c]\n",__FILE__,__FUNCTION__,__LINE__,key,key); + //if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("In [%s::%s Line: %d] key = [%d - %c]\n",__FILE__,__FUNCTION__,__LINE__,key,key); Config &configKeys = Config::getInstance(std::pair(cfgMainKeys,cfgUserKeys)); diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 6bdbde196..18e888507 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -647,6 +647,11 @@ void MainWindow::eventKeyDown(char key){ throw runtime_error("In [MainWindow::eventKeyDown] ERROR, program == NULL!"); } + //{ + //Config &configKeys = Config::getInstance(std::pair(cfgMainKeys,cfgUserKeys)); + //printf("----------------------- key [%d] CameraModeLeft [%d]\n",key,configKeys.getCharKey("CameraModeLeft")); + //} + program->keyDown(key); SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); diff --git a/source/shared_lib/sources/platform/sdl/window.cpp b/source/shared_lib/sources/platform/sdl/window.cpp index efd537a43..0be3652c9 100644 --- a/source/shared_lib/sources/platform/sdl/window.cpp +++ b/source/shared_lib/sources/platform/sdl/window.cpp @@ -185,7 +185,11 @@ bool Window::handleEvent() { toggleFullscreen(); } if(global_window) { - global_window->eventKeyDown(getKey(event.key.keysym,true)); + char key = getKey(event.key.keysym,true); + key = tolower(key); + //if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("******************* key [%d]\n",key); + + global_window->eventKeyDown(key); global_window->eventKeyPress(getRawKey(event.key.keysym)); SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); @@ -208,7 +212,9 @@ bool Window::handleEvent() { SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] KEY_UP, Raw SDL key [%d] mod [%d] unicode [%d] scancode [%d]\n",__FILE__,__FUNCTION__,__LINE__,event.key.keysym.sym,event.key.keysym.mod,event.key.keysym.unicode,event.key.keysym.scancode); if(global_window) { - global_window->eventKeyUp(getKey(event.key.keysym,true)); + char key = getKey(event.key.keysym,true); + key = tolower(key); + global_window->eventKeyUp(key); } if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("In [%s::%s Line: %d] =================================== END OF SDL SDL_KEYUP ================================\n",__FILE__,__FUNCTION__,__LINE__);