78

I've just moved to Mac from Linux. There I used to have a fixed number of desktops running full-screen apps. I've managed to configure it on Mac, but yet can not find the way to assign shortcuts to switch between them. For ex. to use Command + 1 to go to the first full-screen desktop.

Several years ago I've been using some app to do so, but I can not find it now. Any ideas on how to do it?

Nimesh Neema
  • 51,809

5 Answers5

98

On macOS Monterey 12 or earlier:

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

enter image description here

On macOS Ventura 13 or later:

  • Go to System Settings 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.

Nimesh Neema
  • 51,809
  • 4
    Thank you for the reply, but standard shortcuts do not allow to switch between full-screen apps, which is the case. I use Karabiner to remap some buttons, but it seems like it does not support anything else – Hulii Borys Jun 18 '19 at 14:30
  • 1
    Fullscreen are always to the right of numbered Spaces & cannot be switched to directly; only by going to the last numbered Space then navigating right until you get there. One more reason I never use fullscreen :\ – Tetsujin Jun 18 '19 at 14:45
  • 2
    @HuliiBorys I use the Move left a space/Move right a space keyboard shortcut as a workaround. – Nimesh Neema Jun 18 '19 at 14:59
  • Full Screen apps can just be ⌘Tab'ed over to. – Jason Salaz May 22 '20 at 07:58
  • Hi, I have three screens, I have the Switch to Desktop enabled. If I select the ctrl+1 I see the desktop on my 1st screen however pressing ctrl+2 or ctrl+3 do nothing. Any ideas? Have I got the wrong end of the stick here or do you think this is a bug? @NimeshNeema – atreeon Aug 25 '20 at 18:21
15

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.

dan
  • 12,177
  • 8
  • 58
  • 136
  • The default solution has 2 major problems:
    • it does not keep track of applications, only desktops, so all the window management has to be done manually on every login.
    • it supports 4 Desktops max, when for the smooth set-up you usually need at least 6 (browser, code editor, terminal, chatters, email, other random stuff)
    – Hulii Borys May 25 '20 at 11:36
  • This shortcut definition supports as many desktop as you create, I am using it with ten ;). You should have tried. – dan May 25 '20 at 16:16
  • This Desktop managment propose you 3 ≠ kind of bindings between application and desktop. You should have tried. – dan May 25 '20 at 16:19
  • I've tried it for approx. a month. It is completely not the same experience as you can get using tiling window managers. – Hulii Borys May 26 '20 at 13:05
  • Ah! took me ages to read the small text that says "To change... double click.. " – dodohjk Apr 20 '23 at 07:52
  • It can be a bit hard to find in the MacOS 13 system settings, as searching for "switch to desktop" won't find anything; but the path is basically still the same as dan said. System Settings -> Keyboard. Find and click the "keyboard shortcuts..." button on the right. Click "Mission Control" on the left. Find and click the ">" next to the second "Mission control" on the right (there are two) to actually see the desktop shortcuts.

    You have to first make as many desktops as you want by opening "Mission control" and clicking the "+" at top right.

    – slinkp Jul 30 '23 at 16:15
5

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.

  • Were you able to get this to work with "desktops" in general? Or simply full screen apps? – codepringle Dec 19 '19 at 12:36
  • 2
    On Mac, I use full-screen apps, which is extremely annoying because they are always listed in random order. If you want to make it work smooth and stable... Go to Linux. After almost half a year, I could not make this garbage work correctly, so I'm moving back. – Hulii Borys Dec 20 '19 at 14:35
  • 2
    Not sure if this is still useful to you, but I've since found that the program yabai for MacOS works very well for this. By default it should give you hotkeys for each space like i3 does on Linux. Alt+1, Alt+2, ... => Space 1, Space 2. https://github.com/koekeishiya/yabai – codepringle Jan 03 '20 at 21:20
  • Thank you @codepringle ! It is much closer to what I was looking for than my hack with Keyboard Maestro. – Hulii Borys Jan 22 '20 at 10:36
  • No problem! Could you update the answer to include yabai? I had a very hard time finding it organically in Google search results because a lot of q/a websites were simply outdated with answers like Keyboard Maestro. – codepringle May 19 '20 at 16:19
  • @codepringle I tried yabai, but it only provides shortcuts for "numbered" spaces. Fullscreen apps automatically go to some "unnumbered" space that I can't seem to create a shortcut for. Also, yabai/amethyst do seem much laggier than linux WMs like dwm/i3, as noted above. – rcorre Jun 28 '22 at 14:36
1

+ / (control + left or right arrow key)

On macOS Sonoma 14.3.1

Zael
  • 111
  • 2
0

using a MacBook Pro without separate keyboard, the best way is to 4 finger swipe on track pad left to right or right to left moves from desktop to desk top or Mission Control F3 or hot corner Mission Control for an overview of apps in the desktops

  • 4
    While this is an alternative solution, the OP specifically asked for "using keyboard shortcuts". – agarza Dec 05 '23 at 04:30