The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: hymie on October 02, 2026, 04:56:29 PM

Title: [r12321] Most keyboard keys not working
Post by: hymie on October 02, 2026, 04:56:29 PM
I just downloaded Simutrans 1.25 r12321 for Linux.  I find that most of my keys are no longer working.  I can use control-keys (for example, control-u still shows the sliced underground mode) but regular keys (such as p for pause) and shifted keys (such as shift-w for fast-forward) are not having any obvious effect.  This happens with both pak128 and pak128.german .

I can switch back and forth between 1.24.5 r 11993 (which works correctly) and 1.25 r 12321 (which does not work).

Title: Re: [r12321] Most keyboard keys not working
Post by: Nazalassa on October 02, 2026, 08:38:53 PM
I can confirm this happens on Linux with the SDL2 backend.

Patch: http://patches.simutrans-germany.com/download.php?file=fix-keys-2.patch

This behaviour appears in r12277, "(hopefully) show soft keyboard on Android". This is the culprit:
Code (C++) Select
gui_textinput_t::~gui_textinput_t()
{
   // does not hurt to close the screen window again to be sure ...             
   dr_stop_textinput();                                                       
}

The attached patch modifies dr_stop_textinput() in the SDL2 backend so that it does not disable textinput unless env_t::hide_keyboard is set.

The SDL3 backend already does the check and so does not need any changes.
Title: Re: [r12321] Most keyboard keys not working
Post by: victor_18993 on October 03, 2026, 10:56:42 AM
Thanks, Nazalassa. I reproduced the issue and confirmed that it started in r12277.

Your patch fixes it and has now been integrated in trunk as r12326. I also checked that text editing, Android input and the hide_keyboard option still behave correctly.

So this should be fixed in current nightlies. Thanks for finding it and providing the patch!