On MacOS, why request keylogging permissions?

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
abtinf
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Nov 09, 2017 7:13 pm
Contact:

On MacOS, why request keylogging permissions?

Post by abtinf »

I started Factorio on MacOS and was confronted with this:
factorio_18.6_permissions.png
factorio_18.6_permissions.png (168.72 KiB) Viewed 1051 times
Why does Factorio request permission to "receive keystrokes from any application"?

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

Re: On MacOS, why request keylogging permissions?

Post by posila »

Is that Steam version or standalone? It could be something in SDL2 (library we use to create application window, handle user input, etc.) as far as I could find we don't have anything that would need to listen to system-wide input events enabled. So it might be triggered also by Steam API we link against in Steam version of the game.

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

Re: On MacOS, why request keylogging permissions?

Post by posila »

https://www.emaculation.com/forum/viewtopic.php?t=10439#p64694 wrote: As the new macOS Catalina was released recently, it was discovered that there was a unnecessary privilege used by the SDL2: It was listening to background key presses solely to track state of the caps lock key. Luckily, there was already a patch for this issue in SDL 2.0.10, so updating the SDL2 library (and adjusting some caps lock support code) fixed this problem.
So it's probably this. We are still on SDL 2.0.9. I'd apply the patch, but further in the thread they claim SDL 2.0.10 caused issues with Caps Lock, so I don't know.

abtinf
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Nov 09, 2017 7:13 pm
Contact:

Re: On MacOS, why request keylogging permissions?

Post by abtinf »

Thank you for looking into this.

The note about macOS Catalina makes sense; many apps are triggering these kinds of warnings now (which has been *eye-opening* and shocking).

Even if you don't patch it--which is ok, since it is easy to just "Deny" permissions--I would suggest you add a note to the download page and steam description letting users know. I know I freaked out and was concerned that your servers or CI/CD pipeline had a security compromise.

I am running the standalone download. Here is the sha1sum:
2a26a1e2a7c42c190ac98244828831811ad86312 factorio_alpha_0.18.6.dmg

Post Reply

Return to “Technical Help”