- more keyboard handler cleanup related to special key presses (like shift)
This commit is contained in:
parent
d3feaaddec
commit
744602d0e3
|
@ -1302,7 +1302,8 @@ void Game::keyDown(char key) {
|
||||||
chatManager.keyDown(key);
|
chatManager.keyDown(key);
|
||||||
|
|
||||||
if(chatManager.getEditEnabled() == false) {
|
if(chatManager.getEditEnabled() == false) {
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] key = %d\n",__FILE__,__FUNCTION__,__LINE__,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);
|
||||||
|
|
||||||
Config &configKeys = Config::getInstance(std::pair<ConfigType,ConfigType>(cfgMainKeys,cfgUserKeys));
|
Config &configKeys = Config::getInstance(std::pair<ConfigType,ConfigType>(cfgMainKeys,cfgUserKeys));
|
||||||
|
|
||||||
|
|
|
@ -600,16 +600,20 @@ MouseButton Window::getMouseButton(int sdlButton) {
|
||||||
char Window::getRawKey(SDL_keysym keysym) {
|
char Window::getRawKey(SDL_keysym keysym) {
|
||||||
char result = 0;
|
char result = 0;
|
||||||
Uint16 c = keysym.unicode;
|
Uint16 c = keysym.unicode;
|
||||||
if((c & 0xFF80) == 0) {
|
if(c != 0 && (c & 0xFF80) == 0) {
|
||||||
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__);
|
||||||
c = keysym.unicode & 0x7F;
|
c = keysym.unicode & 0x7F;
|
||||||
c = toupper(c);
|
//c = toupper(c);
|
||||||
result = (c & 0xFF);
|
result = (c & 0xFF);
|
||||||
|
|
||||||
|
//if(c != 0) {
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("In [%s::%s Line: %d] returning key [%d]\n",__FILE__,__FUNCTION__,__LINE__,result);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("In [%s::%s Line: %d] returning key [%d]\n",__FILE__,__FUNCTION__,__LINE__,result);
|
||||||
return result;
|
return result;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
if(keysym.sym <= 255) {
|
||||||
|
result = keysym.sym;
|
||||||
}
|
}
|
||||||
result = keysym.sym;
|
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("In [%s::%s Line: %d] returning key [%d]\n",__FILE__,__FUNCTION__,__LINE__,result);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("In [%s::%s Line: %d] returning key [%d]\n",__FILE__,__FUNCTION__,__LINE__,result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -854,7 +858,7 @@ char Window::getKey(SDL_keysym keysym,bool skipSpecialKeys) {
|
||||||
if((c & 0xFF80) == 0) {
|
if((c & 0xFF80) == 0) {
|
||||||
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__);
|
||||||
c = keysym.unicode & 0x7F;
|
c = keysym.unicode & 0x7F;
|
||||||
c = toupper(c);
|
//c = toupper(c);
|
||||||
|
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("In [%s::%s Line: %d] #1 (c & 0xFF) [%d]\n",__FILE__,__FUNCTION__,__LINE__,(c & 0xFF));
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("In [%s::%s Line: %d] #1 (c & 0xFF) [%d]\n",__FILE__,__FUNCTION__,__LINE__,(c & 0xFF));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user