[0.17.2] System-wide rebound escape key doesn't exit menus

Things that has been reported already before.
Post Reply
Xiretza
Burner Inserter
Burner Inserter
Posts: 6
Joined: Fri Nov 28, 2014 6:31 pm
Contact:

[0.17.2] System-wide rebound escape key doesn't exit menus

Post by Xiretza »

I use the "caps:swapescape" Xkb option, which basically switches the functions of the capslock and escape keys system-wide (well, in the X session). This is quite useful in a lot of applications that require frequent escape key presses (like vim or factorio) because it makes it much easier to reach. It has never been a problem until now, since the keycode remapping is transparent to factorio.

Unfortunately, 0.17 started using scan codes instead of key codes, which kind of breaks this setup: as previously reported (viewtopic.php?t=53595), "Toggle menu" keybindings other than escape are not properly supported.
Specifically, my escape (physical capslock) key no longer closes the pause menu, and no longer backs out of main menus (such as "Play" or "Settings"). This was reported as "problem 2" in the linked thread. I'm assuming it's a problem for me now because pressing the physical capslock key sends out an escape keysym and a capslock scancode, and factorio now looks at the latter.

Pausing the game and closing out of the other kind of menu ("About", "New Game") works fine, probably because they honor the "Toggle menu" keybind (which is set to the capslock scan code).

It would be amazing if the main menu family (like the pause menu) could also get support for "Toggle menu" scan codes other than escape.
Attachments
factorio-current.log
(5.84 KiB) Downloaded 69 times

Risce
Burner Inserter
Burner Inserter
Posts: 11
Joined: Thu Feb 28, 2019 5:50 pm
Contact:

Re: [0.17.2] System-wide rebound escape key doesn't exit menus

Post by Risce »

See viewtopic.php?f=7&t=65881 (dev post on key remapping) and viewtopic.php?f=7&t=65402 (related / same issue)

Xiretza
Burner Inserter
Burner Inserter
Posts: 6
Joined: Fri Nov 28, 2014 6:31 pm
Contact:

Re: [0.17.2] System-wide rebound escape key doesn't exit menus

Post by Xiretza »

I was just about to say it's probably a dupe of viewtopic.php?t=65402 that exact second, sorry ;)

Post Reply

Return to “Duplicates”