macOS: Navigating between desktops using keyboard shortcuts

Go to System Preferences app → Keyboard → Shortcuts and you can assign keyboard shortcuts to move across Spaces (desktops).

enter image description here

You can also use the F3 (Mission Control) key on your Mac's keyboard to get a birds eye view of all the Spaces (desktops in Mac parlance) and quickly and directly switch to the desired one. However, this will also involve using the mouse/trackpad.

If you are looking for a 3rd-party tool which lets you customize keyboard shortcuts with much fine grain control, a popular app among users of macOS is Karabiner.


I would suggest to simply activate the predefined shortcuts within:

System Preferences… > Keyboard > Shortcuts > Mission Control

enter image description here

These shortcut could be replaced by ⌘1, ⌘2… by clicking on the shortcut part of the shortcut definition line (I love this kind of hidden function to make an OS looks like an exploration game to keep our brain on fighting position).

I didn't because I use these default shortcuts within X11 to switch between windows.


I've found the solution. An application called Keyboard Maestro (KM). It allows for creating very complex scenarios. For my case, it is very simple. Just create Activate a Specific Application inside the Switching Group and assign a hotkey combination.

EDIT: Thanks to @codepringle, https://github.com/koekeishiya/yabai is definitely a better solution. Also, I've found this project, they are doing the same but differently ¯_(ツ)_/¯ https://github.com/ianyh/Amethyst

But any of those are laggy as hell. Eventually, I had to go back to linux + https://i3wm.org/ to have stable window navigation.