[OLD] Fix TIC-80 when using a French AZERTY layout #2657
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2520.
alt+[grave]12345
is not triggered if an AZERTY layout is set (the user can still use esc + function keys). This allows AZERTY keyboards to fully (as far as I can tell) work with TIC-80.There is also some groundwork laid for a potential fix of #1761 in the future, as well as detecting other layouts; this is more work though and definitely a separate PR. Let me know if you'd rather not have this bit and I can dumb it down to strictly detecting AZERTY.
Tested on MacOS 14, Windows 11 and Linux (EndeavourOS/Arch + Wayland + KDE Plasma 6).
Notes for Linux:
setxkbmap
(or something that calls that). If I change the keyboard from KDE Plasma 6 directly, the layout change itself it is not passed down/detected. There isn't anything we can do about this.SDL_VIDEODRIVER=wayland
), only Xwayland. It appears to start and has audio but no window is shown. That's a separate bug to track down. Created TIC-80 doesn't work when forced to run under Wayland #2660.1
for some reason when already on the code tab. That's a separate bug to track down, and is not related to this PR. Created Ifalt+1
produces a key that's valid in TIC-80, it gets inserted in the code editor instead of executing the shortcut #2661.