Add missing key map

This commit is contained in:
Benau 2020-07-15 14:49:46 +08:00
parent fa943c70e3
commit dc8e4ba0dc

View File

@ -1075,7 +1075,7 @@ void CIrrDeviceSDL::createKeyMap()
KeyMap.push_back(SKeyMap(SDLK_LGUI, IRR_KEY_LWIN));
KeyMap.push_back(SKeyMap(SDLK_RGUI, IRR_KEY_RWIN));
// apps missing
KeyMap.push_back(SKeyMap(SDLK_APPLICATION, IRR_KEY_APPS));
KeyMap.push_back(SKeyMap(SDLK_POWER, IRR_KEY_SLEEP)); //??
KeyMap.push_back(SKeyMap(SDLK_KP_0, IRR_KEY_NUMPAD0));
@ -1090,7 +1090,7 @@ void CIrrDeviceSDL::createKeyMap()
KeyMap.push_back(SKeyMap(SDLK_KP_9, IRR_KEY_NUMPAD9));
KeyMap.push_back(SKeyMap(SDLK_KP_MULTIPLY, IRR_KEY_MULTIPLY));
KeyMap.push_back(SKeyMap(SDLK_KP_PLUS, IRR_KEY_ADD));
// KeyMap.push_back(SKeyMap(SDLK_KP_, IRR_KEY_SEPARATOR));
KeyMap.push_back(SKeyMap(SDLK_SEPARATOR, IRR_KEY_SEPARATOR));
KeyMap.push_back(SKeyMap(SDLK_KP_MINUS, IRR_KEY_SUBTRACT));
KeyMap.push_back(SKeyMap(SDLK_KP_PERIOD, IRR_KEY_DECIMAL));
KeyMap.push_back(SKeyMap(SDLK_KP_DIVIDE, IRR_KEY_DIVIDE));
@ -1223,6 +1223,7 @@ void CIrrDeviceSDL::createKeyMap()
ScanCodeMap[SDL_SCANCODE_KP_MULTIPLY] = IRR_KEY_MULTIPLY;
ScanCodeMap[SDL_SCANCODE_KP_MINUS] = IRR_KEY_MINUS;
ScanCodeMap[SDL_SCANCODE_KP_PLUS] = IRR_KEY_PLUS;
ScanCodeMap[SDL_SCANCODE_SEPARATOR] = IRR_KEY_SEPARATOR;
ScanCodeMap[SDL_SCANCODE_KP_ENTER] = IRR_KEY_RETURN;
ScanCodeMap[SDL_SCANCODE_KP_1] = IRR_KEY_NUMPAD1;
ScanCodeMap[SDL_SCANCODE_KP_2] = IRR_KEY_NUMPAD2;
@ -1242,6 +1243,7 @@ void CIrrDeviceSDL::createKeyMap()
ScanCodeMap[SDL_SCANCODE_RSHIFT] = IRR_KEY_RSHIFT;
ScanCodeMap[SDL_SCANCODE_RALT] = IRR_KEY_RMENU;
ScanCodeMap[SDL_SCANCODE_RGUI] = IRR_KEY_RWIN;
ScanCodeMap[SDL_SCANCODE_APPLICATION] = IRR_KEY_APPS;
ScanCodeMap[SDL_SCANCODE_MODE] = IRR_KEY_BUTTON_MODE;
ScanCodeMap[SDL_SCANCODE_MENU] = IRR_KEY_MENU;
}