-
-
Notifications
You must be signed in to change notification settings - Fork 929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't type non-latin symbols from keyboard in game on linux #7296
Comments
I can type non-latin characters using the compose key. That doesn't give me cyrillic characters though. |
Hmm, the ctrl-shift-u input method doesn't work at all for me in OpenTTD. |
ctrl - shift - u (just press), keycode (424 on screenshot above), space. Works for me. |
ctrl+shift+u doesn't do anything here either. must be some external program intercepting your input? that might cause weird effects like this. |
Can the game otherwise show these characters? E.g. via language pack or town names generated/in a scenario? |
...Xorg?... ctrl-shift-u and compose key are X features, AFAIK Yes, game can show this characters. |
maybe this is related? https://superuser.com/questions/358749/how-to-disable-ctrlshiftu-in-ubuntu-linux |
No indeed, but it might be related. Not all Xorg keyboard layouts enable the compose-key the same way, but I'm pretty sure ctrl-shift-u is not handled by Xorg but elsewhere. |
In my setup (opensuse, german keyboard) i can input all kinds of characters using AltGr key. (although most of them display as ? with sprite font) For example |
But the problem is typing russian letters from physical keyboard with russian keyboard layout in system... |
Yeah, so maybe something else is intercepting it? |
Because most of us won't have a physical russian keyboard lying around to test this. |
As far as I know, Cyrillic keyboards typically work via a hardware Cyrillic Lock key similar to Caps Lock on Latin-only keyboards? |
IDK because russian keyboard layout works in entire system including TTYs... @nielsmh no =) I mean I can't write russian letters from physical keyboard using russian keyboard layout in system while latin layout works well |
I've tested with my keyboard set to "ru" in Gnome, and I am able to enter cyrillic characters into OpenTTD. |
@PeterN I tried with older system and all works too |
Have you tried looking at the link i posted? it might help isolating the problem if you could try that out |
I also had this bug at some point (I don't atm). And I spent some trying to fix it and was even reading X11 code for reference. Sadly, I don't remember the details anymore but I came to a conclusion that it's an SDL 1.2 bug that was fixed in SDL2. I can't find that exact bug on sdl bugtracker right now but I recall it was described is some technical terms as it's something to do with X11 sending those symbols differently and SDL failing to handle them correctly. P.S. I was using -v allegro as a workaround. |
You mean launching OpenTTD with this argument? |
@Nik-mmzd yeah, you can select allegro video driver if your openttd is compiled with it. |
How to compile oTTD with allegro support? |
@Nik-mmzd you need to install allegro dev libraries and re-run Btw, check
|
@ldpl yes, all works with allegro =) |
@Nik-mmzd you can also try using my SDL 2 branch if you want to experiment: https://github.com/nikolas/OpenTTD/tree/sdl2 I don't have a Russian keyboard to test this, so I'm curious if it works for you, or breaks in a different way. Text input is handled differently in SDL 2. SDL 2 text input: https://github.com/nikolas/OpenTTD/blob/sdl2/src/video/sdl_v.cpp#L617 |
By the way, I can get "ctrl-shift-u-4-2-4-space" to display Ф here in my browser (on Linux/XFCE), but not in OpenTTD. I'll see if I can find a way to reproduce this in OpenTTD.. |
@nikolas your SDL2 branch just "freeses" at first "frame"
Nothing interesting in logs (just some warnings about ALSA and JACK)... Nothing happens on screen... |
@Nik-mmzd wow.. I haven't seen that before. Thanks for giving this a try. There have been some significant changes with video rendering on this branch, so if you're up to it, you could try again with the latest code. |
This issue has been automatically marked as stale because it has not had any activity in the last two months. |
No, bot, no! |
Version of OpenTTD
Compiled from adb50ce
Also 1.8.0 from openttd.org ("Linux Generic Binaries (x86_64, 64bit)" package)
Expected result
Russian letters in textbox (e.g. vehicle name)
Actual result
Nothing in textbox, keys act as hotkeys
Steps to reproduce
Set keyboard layout to russian
Additional info
libinput 1.12.6, gnome 3.30.2
Any workaround? If I need to provide more data, just ask
The text was updated successfully, but these errors were encountered: