[0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
[0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
In 0.16 minimising the Factorio screen with Alt-W would turn off Alt mode, which was a minor annoyance but could be worked around.
In 0.17, Alt mode only activates when the Alt key is raised: so this no longer happens. However, any key which is pressed along with Alt is now recognised even though Alt is pressed.
In my case, I press Alt-W to minimise a window: Factorio sees the W and so the player starts walking endlessly North, since the key raise is not passed to Factorio. So you could wander into a biter nest while the game is running in the background!
[Edit:] I tried pressing W then Alt to see if that made a difference: the player still walked North, the Factorio window minimised, then the window underneath also minimised!
In 0.17, Alt mode only activates when the Alt key is raised: so this no longer happens. However, any key which is pressed along with Alt is now recognised even though Alt is pressed.
In my case, I press Alt-W to minimise a window: Factorio sees the W and so the player starts walking endlessly North, since the key raise is not passed to Factorio. So you could wander into a biter nest while the game is running in the background!
[Edit:] I tried pressing W then Alt to see if that made a difference: the player still walked North, the Factorio window minimised, then the window underneath also minimised!
Last edited by mward on Sat Mar 02, 2019 8:22 pm, edited 1 time in total.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Additionally, keypresses from windows above Factorio can cause the same thing; closing another window with Alt-F4 causes both Alt mode and the debug pane to toggle.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Related viewtopic.php?f=7&t=67585
Not conflicting if solved properly.
Not conflicting if solved properly.
-
- Long Handed Inserter
- Posts: 85
- Joined: Sun Dec 04, 2016 9:18 pm
- Contact:
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
I suggest rebinding all window manager shortcuts to use the super key. Super is the standard global keycombo prefix. If this Alt-W binding is a default from your WM/desktop environment, complain to the developers of *that* that they're stepping on application shortcuts.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
But Alt-W isn't the application shortcut, W is. Surely you're not suggesting that all single-key keybindings that Factorio uses must not be used in any shortcuts for higher-level functionality.Vegemeister wrote: ↑Wed Mar 13, 2019 6:39 pmI suggest rebinding all window manager shortcuts to use the super key. Super is the standard global keycombo prefix. If this Alt-W binding is a default from your WM/desktop environment, complain to the developers of *that* that they're stepping on application shortcuts.
-
- Long Handed Inserter
- Posts: 85
- Joined: Sun Dec 04, 2016 9:18 pm
- Contact:
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
I am indeed suggesting that all shortcuts for higher-level functionality should include the super key, and shortcuts using only ctrl and/or alt be reserved for applications. All applications, including Factorio, can then avoid conflicts by not using the super key in any shortcuts.tehfreek wrote: ↑Wed Mar 13, 2019 6:46 pmBut Alt-W isn't the application shortcut, W is. Surely you're not suggesting that all single-key keybindings that Factorio uses must not be used in any shortcuts for higher-level functionality.Vegemeister wrote: ↑Wed Mar 13, 2019 6:39 pmI suggest rebinding all window manager shortcuts to use the super key. Super is the standard global keycombo prefix. If this Alt-W binding is a default from your WM/desktop environment, complain to the developers of *that* that they're stepping on application shortcuts.
Kerbal Space Program was (is?) similarly affected by Gnome 2's bad defaults. Functions that are accessed through the alt key on every other platform are bound to something else on Linux, and Linux users can't get proper answers to questions on the forums, because 20 years ago Gnome thought their defaults should accommodate the extremely rare keyboards without a super key.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
I'm not sure that you're reading the issue correctly. It isn't "global shortcuts are messing up my game", it's "Factorio is consuming key event sequences that were initiated when Factorio wasn't even focused".Vegemeister wrote: ↑Wed Mar 13, 2019 8:59 pmI am indeed suggesting that all shortcuts for higher-level functionality should include the super key, and shortcuts using only ctrl and/or alt be reserved for applications. All applications, including Factorio, can then avoid conflicts by not using the super key in any shortcuts.tehfreek wrote: ↑Wed Mar 13, 2019 6:46 pmBut Alt-W isn't the application shortcut, W is. Surely you're not suggesting that all single-key keybindings that Factorio uses must not be used in any shortcuts for higher-level functionality.Vegemeister wrote: ↑Wed Mar 13, 2019 6:39 pmI suggest rebinding all window manager shortcuts to use the super key. Super is the standard global keycombo prefix. If this Alt-W binding is a default from your WM/desktop environment, complain to the developers of *that* that they're stepping on application shortcuts.
Kerbal Space Program was (is?) similarly affected by Gnome 2's bad defaults. Functions that are accessed through the alt key on every other platform are bound to something else on Linux, and Linux users can't get proper answers to questions on the forums, because 20 years ago Gnome thought their defaults should accommodate the extremely rare keyboards without a super key.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Oh. This really sounds like your window manager is messed up or something. We just get and use the events that the OS gives us.
If the OS sends alt+f4 to Factorio, that's not right. Or maybe it's not sending the focus lost/focus gained events correctly.
Maybe you can detail more of what works and what doesn't.
I don't think tehfreek's issue is the same as the original post.
If the OS sends alt+f4 to Factorio, that's not right. Or maybe it's not sending the focus lost/focus gained events correctly.
Maybe you can detail more of what works and what doesn't.
I don't think tehfreek's issue is the same as the original post.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
It would be nice to know which window manager you're using so that I can try to reproduce the issue. At least on Gnome 3 it isn't happening, so your WM is definitely a part of it.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
I did some further testing and was able to reproduce the original issue on my system as well. Changing the modifier in use to Super did not mitigate it.
In my case the WM in use is Marco 1.20.3.
In my case the WM in use is Marco 1.20.3.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
I am using KDE 4.14: so the issue applies to more than one window manager.
If the "Walk North" key is "W" then "Alt-W" should not cause the player to walk north. Additionally, if the Factorio application loses focus then any keys that are pressed on losing focus should be released.
Note that the problem did not occur with earlier versions of Factorio.
If the "Walk North" key is "W" then "Alt-W" should not cause the player to walk north. Additionally, if the Factorio application loses focus then any keys that are pressed on losing focus should be released.
Note that the problem did not occur with earlier versions of Factorio.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
W+Alt should still allow the player to continue walking. (see viewtopic.php?f=7&t=67585)
Otherwise the character stopping when tapping alt would be too annoying. So this makes it quite tricky to solve.
Clearing the walking state on focus lost is probably a reasonable solution.
Otherwise the character stopping when tapping alt would be too annoying. So this makes it quite tricky to solve.
Clearing the walking state on focus lost is probably a reasonable solution.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Bye the way: a workaround for the problem until it is fixed is to press "M" to switch to map mode before minimising the window. Then the map view will scroll endlessly north instead of the player scrolling endlessly north. On switching back, just press "M" again.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Okay, in 0.17.15 I fixed a similar bug that I managed to reproduce and I think that should fix this issue as well. If things are still broken after that release or they get broken in new and exciting ways, definitely let us know!
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Both problems seem solved in 0.17.15.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Minimising the window no longer changes Alt mode or causes endless walking