mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 22:21:18 +02:00
- bugfix for alpha letter keys used for certain hotkey operations
This commit is contained in:
@@ -1303,7 +1303,7 @@ void Game::keyDown(char key) {
|
|||||||
|
|
||||||
if(chatManager.getEditEnabled() == false) {
|
if(chatManager.getEditEnabled() == false) {
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] key = [%d - %c]\n",__FILE__,__FUNCTION__,__LINE__,key,key);
|
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<ConfigType,ConfigType>(cfgMainKeys,cfgUserKeys));
|
Config &configKeys = Config::getInstance(std::pair<ConfigType,ConfigType>(cfgMainKeys,cfgUserKeys));
|
||||||
|
|
||||||
|
@@ -647,6 +647,11 @@ void MainWindow::eventKeyDown(char key){
|
|||||||
throw runtime_error("In [MainWindow::eventKeyDown] ERROR, program == NULL!");
|
throw runtime_error("In [MainWindow::eventKeyDown] ERROR, program == NULL!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//{
|
||||||
|
//Config &configKeys = Config::getInstance(std::pair<ConfigType,ConfigType>(cfgMainKeys,cfgUserKeys));
|
||||||
|
//printf("----------------------- key [%d] CameraModeLeft [%d]\n",key,configKeys.getCharKey("CameraModeLeft"));
|
||||||
|
//}
|
||||||
|
|
||||||
program->keyDown(key);
|
program->keyDown(key);
|
||||||
|
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
@@ -185,7 +185,11 @@ bool Window::handleEvent() {
|
|||||||
toggleFullscreen();
|
toggleFullscreen();
|
||||||
}
|
}
|
||||||
if(global_window) {
|
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));
|
global_window->eventKeyPress(getRawKey(event.key.keysym));
|
||||||
|
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
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);
|
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) {
|
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__);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("In [%s::%s Line: %d] =================================== END OF SDL SDL_KEYUP ================================\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
Reference in New Issue
Block a user