Page 1 of 1
Do not change "ALT mode" when pressing ALT+TAB
Posted: Sat Apr 16, 2022 8:32 pm
by CzBuCHi
TL;DR
Do not change "ALT mode" when pressing ALT+TAB (or any other ALT+... conbination).
What ?
Check when alt key is released if any other key was pressed and if so do not change "ALT mode".
Why ?
When i ALT+TAB outside game and then back in "ALT mode" gets flipped and i need to press alt to 'fix' it.
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Sat Apr 16, 2022 8:46 pm
by FuryoftheStars
Works fine for me? I don't have that issue.
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Sat Apr 16, 2022 10:55 pm
by CzBuCHi
are you sure you have Toggle "alt mode" set to left / right alt and not to something else?
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Sat Apr 16, 2022 11:49 pm
by Presentist
No issue in my game either.
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Sun Apr 17, 2022 6:37 am
by FuryoftheStars
CzBuCHi wrote: ↑Sat Apr 16, 2022 10:55 pm
are you sure you have Toggle "alt mode" set to left / right alt and not to something else?
Yes. I can press the alt key (by itself) and it will toggle alt mode. It just does not do it when alt-tabbing.
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Sun Apr 17, 2022 7:59 am
by benwillard
I removed the ALT shortcut, anyway it's useless.
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Sun Apr 17, 2022 9:54 am
by lyvgbfh
I moved my alt mode to right alt to prevent this.
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Mon Apr 18, 2022 5:27 pm
by CzBuCHi
ended up by also removing alt shortcut - specially when there is a button on toolbar to toggle ...
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Mon Apr 18, 2022 5:36 pm
by FuryoftheStars
Well, having the keybind is nice as it's faster, plus it frees up the toolbar shortcut for something else (especially in the case of mods).
That said, I do find it interesting that some people are having this issue and some aren't. Makes me think it's less of a game issue and maybe more OS/OS settings? Not sure. :/
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Mon Apr 18, 2022 6:57 pm
by Tertius
I'm on Windows 10, and it also happens for me that ALT-Tabbing out of Factorio toggles ALT-mode within Factorio. I have to activate it again after I switch back to Factorio. It is an annoyance I never thought more about it, and this thread made me realize there's an easy workaround. So I changed the keybinding from ALT to ALTGR (right ALT-key). (thanks for this idea!)
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Mon Apr 18, 2022 7:43 pm
by netmand
This used to be an issue for me. Now under I no longer have this issue, it preserves the Alt mode whenever I alt-tab out of a running game. I'm not sure when this changed I did notice the change but it was so far under my radar that I didn't care to note which release. I am using Windows 11 maybe that's it?
I don't alt-tab out of the game as much as I used to, very rarely these days. Most of the time I pause and save the game before focusing my attention to another application.
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Mon Apr 18, 2022 8:42 pm
by FuryoftheStars
I'm using Win 10, 21H2 (and again, not an issue for me).
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Mon Apr 18, 2022 11:50 pm
by Tertius
Being encouraged by this thread, I tried to find a way to reproduce. Usually, ALT-mode isn't toggled. But one out of perhaps 5 tries, ALT-Tabbing out of Factorio toggles ALT-mode within Factorio. It only toggles ALT-Tabbing out of Factorio, never into Factorio.
It seems ALT-mode is toggled the moment I tap the TAB key, when Factorio loses focus and the Windows tasklist appears. But in this moment, I still hold down the ALT-key (I checked!). It doesn't always happen, only one out of perhaps 5 tries. Perhaps Windows sends an "ALT key up" event although the key isn't actually released.
A workaround could perhaps be to check if Factorio still has focus, and if it doesn't have the focus any more, don't toggle ALT-mode. However, I don't know if the moment Factorio receives the ALT key up message the focus is still on Factorio or already on the task switch window of Windows or even on the app I'm switching to.
Running current Windows 10 and Steam version of Factorio. Happens regardless of windowed or fullscreen mode.
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Tue Apr 19, 2022 12:15 am
by ssilk
This one is slighly related to
viewtopic.php?f=71&t=938
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Sun May 01, 2022 9:48 pm
by jamiechi1
I still find it amazing that a programmer would ever use a shift key, in this case the 'Alternate Shift' key to change the mode of something in a program.
The best way to fix this issue is to rebind the 'Alt mode' function to the letter 'I' (for Information) or some other key.
I am pretty sure I objected to this in the forum years ago, but I wouldn't be surprised if my objection was deleted by the developers. Using Shift, Control or Alternate Shift keys to change program states or modes by themselves is just wrong.
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Wed May 04, 2022 8:36 pm
by Koub
There was a change back in 0.17 to fix that issue :
viewtopic.php?f=23&t=65455
Re: Do not change "ALT mode" when pressing ALT+TAB
Posted: Sat May 21, 2022 5:34 pm
by GaticusHax
I didn't even realize I had any issue until I read this thread.
I haven't had any issues with ALT-TAB but I do use ALT-B, ALT-D, ALT-U a lot which frequently toggles the alt-mode inadvertently, among other ALT-combinations.
Usually it happens when I don't commit to what I was about to do, so I pressed ALT in preparation for pressing ALT-B, etc, but then I changed my mind.
Releasing the ALT key, then toggle, and I have to remember to toggle it back.
I agree that the alt-mode should be rebound to a different key.
I like the suggestion of using the 'I' key and renaming the mode to Info-Mode to correspond with the key and intent.