From: Holger Schemel Date: Wed, 19 Aug 2020 21:37:33 +0000 (+0200) Subject: fixed level editor key shortcuts (broken by regression) X-Git-Tag: 4.2.0.1~1 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=35da46e44d40c2f2b88e75c8c414e4129d734889 fixed level editor key shortcuts (broken by regression) This change fixes a regression of commit 888ee049 that causes problems when handling text input in situations unrelated to the Android screen keyboard, like entering key shortcuts with upper case letters inside the level editor on non-Android platforms. Thanks to Eizzoux for reporting this bug! --- diff --git a/src/events.c b/src/events.c index 2678fa28..834b4232 100644 --- a/src/events.c +++ b/src/events.c @@ -1382,7 +1382,12 @@ static void HandleButtonOrFinger(int mx, int my, int button) static boolean checkTextInputKey(Key key) { - return (textinput_status && KSYM_PRINTABLE(key)); + // when playing, only handle raw key events and ignore text input + if (game_status == GAME_MODE_PLAYING) + return FALSE; + + // else handle all printable keys as text input + return KSYM_PRINTABLE(key); } void HandleTextEvent(TextEvent *event)