[1.1.30] Keybindings and Modifiers

This subforum contains all the issues which we already resolved.
Post Reply
mercdawg
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Apr 08, 2021 2:22 am
Contact:

[1.1.30] Keybindings and Modifiers

Post by mercdawg »

Hi!

I use a streamdeck, which is a macro device and some of buttons are bound to long key-combinations, such as CTRL-ALT-SHIFT-F12, to avoid myself from triggering it manually. Very recently, I noticed my game was closing and didn't know why until I investigated. Whenever I muted myself on Discord, the game closed. Turns out, it had "ALT" and "F4" in the macro (it was "CTRL-SHIFT-ALT-F4").

Now - You are probably saying, "Well Mr. Derp, you ALT-F4 the application and it closed" and I would say correct, however, it isn't. When you do CTRL-ALT-SHIFT-F4, the key combination does not send a command to close the application (Windows 10). However, Factorio sees "ALT-F4" in the combination and closes the application.

My theory is that Factorio is listening to part of the key combinations, instead of the full key combination, and triggering commands based on that. For example, when you do CTRL-ALT-F1, the game registers "ALT" and "CTRL-F1" as separate inputs and triggers two events, instead of treating it as one key combination.

I adjusted the keybindings on my end to avoid the game closing. Would it be possible to have Factorio's developers look into this and provide a fix or an option in the settings to disable the partial key listener?

Thanks,
Merc

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [1.1.30] Keybindings and Modifiers

Post by posila »

I thought Alt + F4 was entirely handled by the OS, but apparently SDL catches it and handles it by itself.
Fixed for the next release.

You can disable Alt + F4 shortcut for Factorio (well, all games/application that use SDL) by createing environment variable
SDL_WINDOWS_NO_CLOSE_ON_ALT_F4 with value 1

Post Reply

Return to “Resolved Problems and Bugs”