[1.1.76][mac-arm] ⌘ (Cmd) + W closes the game without saving

Suggestions that have been added to the game.

Moderator: ickputzdirwech

User avatar
Koen02
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Mar 21, 2023 9:39 am
Contact:

[1.1.76][mac-arm] ⌘ (Cmd) + W closes the game without saving

Post by Koen02 »

⌘ (Cmd) + W is a system shortcut in Mac OS to close an application. I have pressed this in-game multiple times (accidentally) and it closes the game and sets you back to the latest autosave.

An easy fix is to intercept the shortcut and do nothing within the factorio code.

Facorio Version: 1.1.76 (Happening since at least the apple silicon update)
Device: Apple MacBook Pro 14 inch, M1 Pro
Keyboard: Built-in keyboard & Logitech MX Keys (mac compatible)
Version: MacOS Ventura 13.2.1


EDIT: also happens on 1.1.78
Last edited by Koen02 on Tue Mar 21, 2023 11:56 am, edited 1 time in total.
Koub
Global Moderator
Global Moderator
Posts: 7784
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: [1.1.76][mac-arm] ⌘ (Cmd) + W closes the game without saving

Post by Koub »

Resolved on 1.1.78 :
viewtopic.php?f=3&t=105647
[Koub] Moved to Resolved
Koub - Please consider English is not my native language.
Xorimuth
Filter Inserter
Filter Inserter
Posts: 695
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: [1.1.76][mac-arm] ⌘ (Cmd) + W closes the game without saving

Post by Xorimuth »

Koub wrote: Tue Mar 21, 2023 11:37 am Resolved on 1.1.78 :
viewtopic.php?f=3&t=105647
[Koub] Moved to Resolved
No, this is not the same as 105590

That one was specifically for a conflicting keybind when using AZERTY.

This one is just that in general, Command+W is far to easy to accidentally press when playing (I’ve done it many times myself). Like command+C to copy, and then you press W to move up just before letting go of Command.
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
User avatar
Koen02
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Mar 21, 2023 9:39 am
Contact:

Re: [1.1.76][mac-arm] ⌘ (Cmd) + W closes the game without saving

Post by Koen02 »

I don't use AZERTY. There is no interference with in-game shortcuts. The problem is accidentally hitting Cmd + W. The quitting without saving still happens on 1.1.78.
User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1622
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: [1.1.76][mac-arm] ⌘ (Cmd) + W closes the game without saving

Post by jodokus31 »

I figured, that an application can't do anything to change those macOS system-hotkeys, unless I missing something.
You could also change WASD control to somewhere else, factorio has an incredible flexibility, when it comes to key rebinds.

Coming from windows/linux, I changed Cmd to Ctrl key on my external keyboard. And I always press CmdQ or CmdW at some point. So best is, to intercept in systemsettings for this application.

I don't understand why MacOS has to behave very contrary compared to windows in very basic things. I probably never get used to it.
User avatar
Koen02
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Mar 21, 2023 9:39 am
Contact:

Re: [1.1.76][mac-arm] ⌘ (Cmd) + W closes the game without saving

Post by Koen02 »

jodokus31 wrote: Tue Mar 21, 2023 12:40 pm I figured, that an application can't do anything to change those macOS system-hotkeys, unless I missing something.
An application can easily intercept hotkeys on MacOS, for example browsers like firefox or chromium rebind it to "close tab".

jodokus31 wrote: Tue Mar 21, 2023 12:40 pm I don't understand why MacOS has to behave very contrary compared to windows in very basic things. I probably never get used to it.
It's similar to windows' alt + f4.
I don't think it's fair to see windows as a role model for all other OS's. MacOS probably has as much history as windows.
Koub
Global Moderator
Global Moderator
Posts: 7784
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: [1.1.76][mac-arm] ⌘ (Cmd) + W closes the game without saving

Post by Koub »

Xorimuth wrote: Tue Mar 21, 2023 11:46 am No, this is not the same as 105590

That one was specifically for a conflicting keybind when using AZERTY.

This one is just that in general, Command+W is far to easy to accidentally press when playing (I’ve done it many times myself). Like command+C to copy, and then you press W to move up just before letting go of Command.
Koen02 wrote: Tue Mar 21, 2023 11:50 am I don't use AZERTY. There is no interference with in-game shortcuts. The problem is accidentally hitting Cmd + W. The quitting without saving still happens on 1.1.78.
Sorry, misunderstood the actual issue. Not a bug though, it's a suggestion/request
[Koub] Moving the thread to the appropriate subforum
Koub - Please consider English is not my native language.
User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1622
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: [1.1.76][mac-arm] ⌘ (Cmd) + W closes the game without saving

Post by jodokus31 »

Koen02 wrote: Tue Mar 21, 2023 1:14 pm
jodokus31 wrote: Tue Mar 21, 2023 12:40 pm I figured, that an application can't do anything to change those macOS system-hotkeys, unless I missing something.
An application can easily intercept hotkeys on MacOS, for example browsers like firefox or chromium rebind it to "close tab".
I don't use CtrlQ or CtrlW as hotkey. It's more some item transfer actions (Ctrl+Click) while running via WASD.
Maybe factorio could make them no-ops for the system, if possible.
Koen02 wrote: Tue Mar 21, 2023 1:14 pm
jodokus31 wrote: Tue Mar 21, 2023 12:40 pm I don't understand why MacOS has to behave very contrary compared to windows in very basic things. I probably never get used to it.
It's similar to windows' alt + f4.
I don't think it's fair to see windows as a role model for all other OS's. MacOS probably has as much history as windows.
I don't know who started to diverge, it's just a fact.
I don't know, how good you can customize windows to apply to macOS behavior (probably quite poor, too), but macOS makes it pretty hard to behave similar to windows. It's makes using both systems pretty annoying so far. I have to download apps and stuff to be able to operate it somewhat similar. And I don't want to relearn everything.
I wonder, if macOS has different desktop environments, which are better for people coming from windows/linux. Linux is the most customizable.
Factoruser
Fast Inserter
Fast Inserter
Posts: 167
Joined: Tue Sep 16, 2014 5:48 pm
Contact:

Re: [1.1.76][mac-arm] ⌘ (Cmd) + W closes the game without saving

Post by Factoruser »

Koen02 wrote: Tue Mar 21, 2023 9:50 am ⌘ (Cmd) + W is a system shortcut in Mac OS to close an application.
No, it's the standard shortcut to close the active WINDOW. ⌘Q is the system shortcut to quit an application. It's strange whether Factorio should react to ⌘W, but this should be removed. Further it's possible to catch ⌘Q like Alt+F4 on Windows. This is not a forced kill - it's propably SIGTERM, but not SIGKILL.
StrangePan
Factorio Staff
Factorio Staff
Posts: 131
Joined: Fri Dec 07, 2018 3:41 pm
Contact:

Re: [1.1.76][mac-arm] ⌘ (Cmd) + W closes the game without saving

Post by StrangePan »

The "Close window" shortcut (Cmd+W) will be disabled starting from 1.1.82. Cmd+Q (Quit Factorio) and Cmd+Opt+W (Close all windows) will continue to work.
Siarhei
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Jan 15, 2023 5:08 pm
Contact:

Re: [1.1.76][mac-arm] ⌘ (Cmd) + W closes the game without saving

Post by Siarhei »

The "Close window" shortcut (Cmd+W) will be disabled starting from 1.1.82. Cmd+Q (Quit Factorio) and Cmd+Opt+W (Close all windows) will continue to work.
It's a greate news about Cmd+W. It would be also awesome to have autosave before quite. Sometimes I close Factorio via Cmd+Q by accident.
Anyway thanks a lot for Cmd+w, it's very useful
Last edited by Siarhei on Thu Apr 27, 2023 5:27 pm, edited 1 time in total.
keymone
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Jul 19, 2019 5:08 pm
Contact:

Re: [1.1.76][mac-arm] ⌘ (Cmd) + W closes the game without saving

Post by keymone »

Thank you so much! i just closed factorio by cmd+w accidentally while reading this topic 😅

to me every time this happened was when running upwards and trying to bring up the copy tool
Post Reply

Return to “Implemented Suggestions”