1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Change keycode to scancode

This commit is contained in:
Koncord 2016-12-30 02:33:44 +08:00
parent 7595b33461
commit b9c3849cc7
2 changed files with 5 additions and 5 deletions

View file

@ -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)

View file

@ -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);