reintroducing mapping of numpad enter to normal one

tomreyn convinced me that numpad-enter and normal enter should always 
be handled the same way. 
Doing this I also enabled the mapping of delete to backspace .
This commit is contained in:
titiger 2015-12-14 01:20:09 +01:00
parent d6d4910111
commit 19df221af2
1 changed files with 11 additions and 10 deletions

View File

@ -911,22 +911,23 @@ bool isKeyPressed(SDL_Keycode compareKey, SDL_KeyboardEvent input,vector<int> mo
bool result = (c == compareKey);
//printf("result = %d input = %d compare = %d\n",result,c,compareKey);
// if(result == false) {
// if(compareKey == SDLK_RETURN) {
// result = (c == SDLK_KP_ENTER);
// }
// else if(compareKey == SDLK_KP_ENTER) {
// result = (c == SDLK_RETURN);
// }
if(result == false) {
if(compareKey == SDLK_RETURN) {
result = (c == SDLK_KP_ENTER);
}
else if(compareKey == SDLK_KP_ENTER) {
result = (c == SDLK_RETURN);
}
else if(compareKey == SDLK_BACKSPACE) {
result = (c == SDLK_DELETE);
}
}
// else if(compareKey == SDLK_ASTERISK) {
// result = (c == SDLK_KP_MULTIPLY);
// }
// else if(compareKey == SDLK_KP_MULTIPLY) {
// result = (c == SDLK_ASTERISK);
// }
// else if(compareKey == SDLK_BACKSPACE) {
// result = (c == SDLK_DELETE);
// }
// else if (compareKey == SDLK_0) {
// result = (c == SDLK_KP_0);
// } else if (compareKey == SDLK_1) {