diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 67f38a264..566aa5f11 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -664,7 +664,7 @@ namespace MWInput void InputManager::keyPressed( const SDL_KeyboardEvent &arg ) { - mwmp::Main::pressedKey(arg.keysym.sym); + mwmp::Main::pressedKey(arg.keysym.scancode); // HACK: to make Morrowind's default keybinding for the console work without printing an extra "^" upon closing // This assumes that SDL_TextInput events always come *after* the key event // (which is somewhat reasonable, and hopefully true for all SDL platforms) diff --git a/apps/openmw/mwmp/GUIController.cpp b/apps/openmw/mwmp/GUIController.cpp index 7a4facc01..53953262a 100644 --- a/apps/openmw/mwmp/GUIController.cpp +++ b/apps/openmw/mwmp/GUIController.cpp @@ -39,8 +39,8 @@ mwmp::GUIController::GUIController(): mInputBox(0), mListBox(0) { mChat = nullptr; - keySay = SDLK_y; - keyChatMode = SDLK_F2; + keySay = SDL_SCANCODE_Y; + keyChatMode = SDL_SCANCODE_F2; calledMessageBox = false; } @@ -67,8 +67,8 @@ void mwmp::GUIController::setupChat(const Settings::Manager &mgr) int chatW = mgr.getInt("w", "Chat"); int chatH = mgr.getInt("h", "Chat"); - keySay = SDL_GetKeyFromName(mgr.getString("keySay", "Chat").c_str()); - keyChatMode = SDL_GetKeyFromName(mgr.getString("keyChatMode", "Chat").c_str()); + keySay = SDL_GetScancodeFromName(mgr.getString("keySay", "Chat").c_str()); + keyChatMode = SDL_GetScancodeFromName(mgr.getString("keyChatMode", "Chat").c_str()); mChat = new GUIChat(chatX, chatY, chatW, chatH); mChat->setDelay(chatDelay);