diff --git a/desktop_version/src/KeyPoll.cpp b/desktop_version/src/KeyPoll.cpp index e6242369..88c7a5bf 100644 --- a/desktop_version/src/KeyPoll.cpp +++ b/desktop_version/src/KeyPoll.cpp @@ -79,7 +79,7 @@ void KeyPoll::disabletextentry() void KeyPoll::Poll() { - bool modifierPressed = false; + bool altpressed = false; SDL_Event evt; while (SDL_PollEvent(&evt)) { @@ -95,12 +95,10 @@ void KeyPoll::Poll() pressedbackspace = true; } - modifierPressed = keymap[SDLK_LCTRL] || keymap[SDLK_RCTRL] || keymap[SDLK_LALT] || keymap[SDLK_RALT] || keymap[SDLK_LGUI] || keymap[SDLK_RGUI]; - #ifdef __APPLE__ /* OSX prefers the command keys over the alt keys. -flibit */ - bool altpressed = keymap[SDLK_LGUI] || keymap[SDLK_RGUI]; + altpressed = keymap[SDLK_LGUI] || keymap[SDLK_RGUI]; #else - bool altpressed = keymap[SDLK_LALT] || keymap[SDLK_RALT]; + altpressed = keymap[SDLK_LALT] || keymap[SDLK_RALT]; #endif bool returnpressed = evt.key.keysym.sym == SDLK_RETURN; bool fpressed = evt.key.keysym.sym == SDLK_f; @@ -138,7 +136,7 @@ void KeyPoll::Poll() } break; case SDL_TEXTINPUT: - if (!modifierPressed) + if (!altpressed) { keybuffer += evt.text.text; } diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index 6ee8c7f8..2eaaa905 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -495,7 +495,6 @@ void editorclass::getlin(const enum textmode mode, const std::string& prompt, st ed.textmod = mode; ed.textptr = ptr; ed.textdesc = prompt; - ed.textentry = true; key.enabletextentry(); if (ptr) { diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index e0f677b3..dfab5fee 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -617,7 +617,7 @@ void inline fixedloop() //Mute button #if !defined(NO_CUSTOM_LEVELS) && !defined(NO_EDITOR) - bool inEditor = ed.textentry || ed.scripthelppage == 1; + bool inEditor = ed.textentry || ed.textmod != TEXT_NONE || ed.scripthelppage == 1; #else bool inEditor = false; #endif