[1.1.87] (linux64) Rebound ESC key does not register

This subforum contains all the issues which we already resolved.
wahlencraft
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Jan 11, 2021 5:02 pm
Contact:

[1.1.87] (linux64) Rebound ESC key does not register

Post by wahlencraft »

I'm running Linux Debian bookworm (linux 6.1.0-11-amd64) on a HP Proobook 440 G6. I have installed factorio via steam. I have swapped the places of caps lock and escape (due to preference) using the command "setxkbmap -option caps:swapescape". This however prevents factorio from detecting presses on the esc key. I can't open the setting menu.

How to re-produce:
1. Open Factorio on (I guess any) linux and verify that esc works and that it's possible to open the settings menu.
2. Open a terminal and run "setxkbmap -option caps:swapescape".
3. Start Factorio again. You can't open settings with esc or caps lock. I would have expected the caps lock button to do it instead (as does every other program that I tried).
PostmodernPrometheus
Burner Inserter
Burner Inserter
Posts: 9
Joined: Thu Jul 20, 2023 4:03 am
Contact:

Re: [Donion] [1.1.87] (linux64) Rebound ESC key does not register

Post by PostmodernPrometheus »

I have a similar problem but with CapsLock/control and somehow it turns out there are two different ways to remap capslock to ctrl and one way works and one doesn't. I think it depends on if the capslock key is also explicitly unmapped from performing the capslock function or just implicitly by remapping it. viewtopic.php?f=182&t=107856

I was using gnome-tweaks not setxkbmap so I don't know how that translates for you but you might be able to do this using gnome-tweaks. I can try this out later.

This and other linux remapping issues seem to be new in 1.1.81 and later versions (with the SDL update), so if you can get 1.1.80 or older that might help. viewtopic.php?t=105959

-Postmodern Prometheus
PostmodernPrometheus
Burner Inserter
Burner Inserter
Posts: 9
Joined: Thu Jul 20, 2023 4:03 am
Contact:

Re: [Donion] [1.1.87] (linux64) Rebound ESC key does not register

Post by PostmodernPrometheus »

I tried playing with xmodmap, I couldn't get the escape/ctrl swap to work. I guess my workaround is specific to remapping capslock to control, not generic to remapping capslock.

-Postmodern Prometheus
Donion
Factorio Staff
Factorio Staff
Posts: 326
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [Donion] [1.1.87] (linux64) Rebound ESC key does not register

Post by Donion »

I looked into the caps:swapescape and it seems this is an issue in SDL which has been fixed in newer versions. I'll see if I can backport the fix or if we need to update. I'll let you know once I know more.

PostmodernPrometheus wrote: Wed Aug 23, 2023 10:35 pm I have a similar problem but with CapsLock/control and somehow it turns out there are two different ways to remap capslock to ctrl and one way works and one doesn't.
From my testing of handling remapped keys I can tell you there are many ways to do it and they all can behave differently (or just don't work at all) on different setups (this makes troubleshooting very tricky).
It sounds like you found a way to make the CapsLock/Control work on your end. If the workaround is not ideal for you, please, make a separate bug report with exact steps how you're setting your keyboard so I can try to reproduce it. Also, it helps if you include the output of xev when you press the remapped key(s).
Donion
Factorio Staff
Factorio Staff
Posts: 326
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [Donion] [1.1.87] (linux64) Rebound ESC key does not register

Post by Donion »

I have backported the fix from SDL 2.28.0 and resolved a second issue related to remapping Escape key (and several other keys). It should be fixed in the next release.
Thanks for the report.
Post Reply

Return to “Resolved Problems and Bugs”