- fixed bug with unicode keypresses while pressing control
This commit is contained in:
parent
744602d0e3
commit
ea8ce1d5c7
|
@ -599,17 +599,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;
|
if(keysym.mod & (KMOD_LCTRL | KMOD_RCTRL) == 0) {
|
||||||
if(c != 0 && (c & 0xFF80) == 0) {
|
Uint16 c = keysym.unicode;
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(c != 0 && (c & 0xFF80) == 0) {
|
||||||
c = keysym.unicode & 0x7F;
|
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
//c = toupper(c);
|
//c = keysym.unicode & 0x7F;
|
||||||
result = (c & 0xFF);
|
//c = toupper(c);
|
||||||
|
result = (c & 0xFF);
|
||||||
|
//result = c;
|
||||||
|
|
||||||
//if(c != 0) {
|
//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) {
|
if(keysym.sym <= 255) {
|
||||||
result = keysym.sym;
|
result = keysym.sym;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user