Temporarily disable shortcuts when in games

Hi everyone,


when playing some games which use keys like space, option, command and the cursor keys the keyboard shortcuts for Spotlight and Mission Control interfere with the game. For example a Spotlight search window appears when I press cmd + space simultaneously, or I switch to another virtual desktop when using control + an arrow key.


I know that I can assign other keyboard shortcuts and how to disable them in System Preferences. What I’d like to do is disable them while playing the game and re-enable them afterwards. Automatic would be awesome, but a menu bar item or shell script etc. would also work for me.


I do not want to open Sys Prefs every single time before and after playing a game and I also do not want to reassign the default shortcuts to something else. Any ideas?

Posted on Feb 25, 2025 3:47 AM

Reply
12 replies

Feb 25, 2025 4:16 AM in response to Björn Herrmann

Björn Herrmann wrote:

Creating a 2nd user account would work, but be as inconvenient as disabling the shortcuts temporarily by hand…

Actually not. You only have to disable the shortcuts for the second account once. Plus, you could be logged into both accounts and use fast user switching to go back and forth.


Or, you can wait for someone to write what would no doubt be a complicated script for you, to turn the shortcuts on and off.

Feb 25, 2025 4:26 AM in response to dialabrain

I know that, but I do not want 2 user accounts. The games I play are usually old 90s titles which use either DOSBox or have a port or modern client. The game data is in different locations for these, i.e. ~/Library/Application Support/etc. and I would need to move all over to the 2nd account while editing con files with absolute paths in them.


Compared to that a trip to Sys Prefs is still easier and faster, FUS won’t help here. Maybe I should have asked how to change keyboard shortcuts via AppleScript or from the shell. I could incorporate that in script and bind it to something.

Feb 25, 2025 4:50 AM in response to Björn Herrmann

Björn Herrmann wrote:

It’s not that complex. It’s just the Mission Control (control + arrow left/right) and Spotlight (command + space) shortcuts that needed to be disabled (or set to something else) temporarily.

You might try asking over at


https://apple.stackexchange.com/


where there I think there is some extra expertise in scripting and usiing Karabiner Elements to modify things.

Feb 25, 2025 8:17 AM in response to Barney-15E

Normally I would agree, but most of the stuff I want to play is old games mostly from other platforms which run through a compatibility layer like DOSBox, Wine, etc. They precede Mac OS X by quite a bit so voting with my wallet is not an option anymore.


Well, thanks everyone for your input. Seems there’s nothing off the shelf I can use and I have to script it myself.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Temporarily disable shortcuts when in games

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.