Page 1 of 1
[0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Posted: Sat Mar 02, 2019 6:52 pm
by mward
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!
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Posted: Sat Mar 02, 2019 7:08 pm
by tehfreek
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
Posted: Wed Mar 13, 2019 5:49 pm
by Twinsen
Related
viewtopic.php?f=7&t=67585
Not conflicting if solved properly.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Posted: Wed Mar 13, 2019 6:39 pm
by Vegemeister
mward wrote: ↑Sat Mar 02, 2019 6:52 pm
In my case, I press Alt-W to minimise a window
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
Posted: Wed Mar 13, 2019 6:46 pm
by tehfreek
Vegemeister wrote: ↑Wed Mar 13, 2019 6:39 pm
mward wrote: ↑Sat Mar 02, 2019 6:52 pm
In my case, I press Alt-W to minimise a window
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.
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.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Posted: Wed Mar 13, 2019 8:59 pm
by Vegemeister
tehfreek wrote: ↑Wed Mar 13, 2019 6:46 pm
Vegemeister wrote: ↑Wed Mar 13, 2019 6:39 pm
mward wrote: ↑Sat Mar 02, 2019 6:52 pm
In my case, I press Alt-W to minimise a window
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.
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.
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.
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
Posted: Thu Mar 14, 2019 1:36 am
by tehfreek
Vegemeister wrote: ↑Wed Mar 13, 2019 8:59 pm
tehfreek wrote: ↑Wed Mar 13, 2019 6:46 pm
Vegemeister wrote: ↑Wed Mar 13, 2019 6:39 pm
mward wrote: ↑Sat Mar 02, 2019 6:52 pm
In my case, I press Alt-W to minimise a window
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.
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.
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.
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.
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".
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Posted: Thu Mar 14, 2019 4:42 pm
by Twinsen
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.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Posted: Thu Mar 14, 2019 4:49 pm
by Oxyd
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
Posted: Thu Mar 14, 2019 7:18 pm
by tehfreek
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.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Posted: Fri Mar 15, 2019 12:15 pm
by mward
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.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Posted: Fri Mar 15, 2019 12:19 pm
by Twinsen
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.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Posted: Fri Mar 15, 2019 1:28 pm
by mward
Twinsen wrote: ↑Fri Mar 15, 2019 12:19 pmClearing the walking state on focus lost is probably a reasonable solution.
That would be a perfectly acceptable solution, thanks.
Re: [0.17.4] Linux: Minimising full screen Factorio with Alt-W causes the player to walk North
Posted: Fri Mar 15, 2019 2:12 pm
by mward
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
Posted: Mon Mar 18, 2019 5:27 pm
by Oxyd
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
Posted: Mon Mar 18, 2019 9:17 pm
by tehfreek
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
Posted: Mon Mar 18, 2019 10:27 pm
by mward
Minimising the window no longer changes Alt mode or causes endless walking