Open erlehmann opened 10 months ago
It seems that this issue is not translation-related: When I press the right “alt” key (in X11 lingo: ISO_Level5_Shift) in Minetest started with LANG=C
, it displays “Left Button”.
This is another thing that show be fixed by SDL
I tried with a different keyboard (Thinkpad T60 QWERTZ) and had the same results, except that the Fn key was also detected as “Linke Taste” / “Left Button”, which probably means it is impossible to use numpad keys on laptops with the current version of Minetest (not that I do that, but …).
This is another thing that show be fixed by SDL
@rubenwardy do you mean it should be (i.e. will be) fixed some day or it should have (i.e. has) already been fixed?
@rubenwardy so I compiled Minetest at commit 5.7.0-350-g8a9855241
with SDL now and got the following:
I can almost see a pattern here, but ß is not recognized at all.
Edit: If anything, using SDL is worse than not using SDL here.
I think rubenwardy meant that it's possible to fix this using SDL, by replacing our own key name logic with SDL_GetKeyName
.
@v-rob has written a small SDL program to check keycodes and scancodes: https://gist.github.com/v-rob/4ef28c7ae9f45fcf697dbc0f3a64ee5c
This is the result (partially correct, but still broken for modifier and dead keys):
Looking at the Neo2 layout, scancodes all work as expected, which is good. Hopefully, we can use transition to SDL scancodes for in-game controls instead of keycodes. Formspecs still require keycodes (for e.g. shortcuts like Ctrl+C, not for character input), so we can't add scancode support until we fully transition to SDL.
related: #14940
QWERTY Italian keyboard, can confirm, my \
is OEM5
Minetest version
Active renderer
OpenGL 1.4
Irrlicht device
X11 / SDL (both are bugged, but in a different way)
Operating system and version
Debian GNU/Linux 11.7
CPU model
Intel(R) Core(TM) Duo CPU T2400 @ 1.83GHz
GPU model
Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
OpenGL version
1.4
Summary
I tried to bind some keys in the keybinding dialog and think they are either mistranslated or mis-detected by Minetest:
Here are the keys I pressed, the German label I see after pressing them and what that translates to:
Edit: The Num Lock key is apparently set to an actual tab character on my system.
Meanwhile, the Menu and Tab keys are correctly detected/labeled as ”Menü” and “Tab”.
My keyboard is a QWERTY keyboard with a numpad and my keyboard layout is German (Neo 2).
Steps to reproduce