166

The fact that each monitor acts on its own in OS X Mavericks is pretty cool. However, I find that I have to use my mouse and click on the unfocused monitor before I can actually slide back and forth its screens (or spaces).

What's the keyboard shortcut to switch focus to another monitor?

update: follow up question

6
  • 2
    doesn't really solve the problem because you have to move you hand to your mouse to move the pointer into the other screen to then put you hand back on the keyboard for the Control + Arrow the only people that might profit are Lefties who use the mouse left-handed. best would be a Shift + Control + Arrow to switch between screens. Now to figure a way to get that Macro to work.
    – user60494
    Commented Oct 25, 2013 at 10:45
  • @Stephan that's exactly what i'm asking about
    – abbood
    Commented Oct 25, 2013 at 13:19
  • 1
    cmd + tab usually works for me when trying to switch from my laptop to my external monitor.
    – Milind
    Commented Sep 30, 2016 at 16:08
  • 1
    It's sad that none of the suggested solutions work for Mac OS Sierra... I think this feature should be built-in the OS.
    – Ardee Aram
    Commented Jan 16, 2017 at 3:05
  • 1
    I don't have enough rep to answer this question, but as of 2022 you can accomplish this rather easily with BetterTouchTool: Create one keyboard shortcut with three assigned actions (Save Current Mouse Position, Move Mouse to Position, and Left Click) and one keyboard shortcut with two assigned actions (Restore Saved Mouse Position and Left Click).
    – ajdev8
    Commented Apr 24, 2022 at 21:13

7 Answers 7

58

Here's a way that works from the keyboard:

  1. Open System Preferences -> Keyboard and click the Shortcuts tab.

  2. Choose Mission Control from the sidebar.

  3. Scroll down until you see Mission Control listed in the main panel; check its box if not checked, and click the disclosure triangle.

  4. You should see Move left a space, Move right a space, and then a series of Switch to Desktop 1, Switch to Desktop 2, etc. for as many desktop spaces as you have going at the moment.

  5. Check all of the boxes of the Switch to Desktop N type.

  6. In my prefs, each of those Switch-tos has a shortcut already there - Ctrl-1, Ctrl-2, ... Ctrl-N, where N is the Desktop number (Control key is shown as a carat ('^'). You can assign whatever you want to these, but keeping them in a sequential scheme helps, so I suggest leaving them as is.

  7. Now, you can switch among your functioning desktops (aka Spaces), and if one you choose is on the other display, focus will shift to that display.

  8. If you don't remember which number a Desktop is, you could first use your shortcut for Mission Control itself (mine is ⌥ Opt-Up Arrow, which I think was the default, but again you can set that for whatever you want). You'll see your current numbered Desktops, and can then use the appropriate shortcut. Press ⎋ Esc to get out of Mission Control.

  9. I see that if I have all of the Switch-tos checked, then if I had another Desktop and check keyboard shortcuts again, the new Desktop is added to the Switch-to list and its shortcut is checked as well. So no need to go back to Prefs after the above steps.

Thanks for stimulating me to poke into this. I was having the same frustration as you and others!

ADDED for El Capitan: In my October 31 2016 note I describe my latest finding for switching to a space in the external display. It seems you need at least two spaces defined on your external display, and then you need to hit Control-N, Control-M, and you will be live in space M, where N & M are space numbers of spaces on the external display.

12
  • 3
    i see the value in what you're saying.. although i still wouldn't consider it ideal. b/c you are using dekstop numbers.. and to go back and forth to a specifically numbered desktop forces you to remember it (having to go through mission control to see the number of a desktop defeats the whole point of a 'shortcut').. the number one rule in human/computer interaction is "don't make me think".. i was hoping for something that's more intiuitive.. like <+[ctr] or smtn.. that requires 0 brain memory/processing on the user's part.. but i still gave you a +1 :)
    – abbood
    Commented Oct 29, 2013 at 5:27
  • 49
    after testing with your solution.. it definitely saves time.. but it doesn't address the main problem: shifting focus.. b/c even if it shows a screen i'm interested in.. that screen is still not in focus.. and so i still gotta take my hands of the keyboard and put my mouse on that screen.. then move my hands back to my keyboard.. :(
    – abbood
    Commented Oct 29, 2013 at 6:36
  • 2
    Hmmm. If I use the Control-N shortcut described above (where N is the Desktop number), the display I just switched to gets focus if it wasn't the desktop in view on that display. If I press Control N+1, then Control-N, then Desktop N comes into focus. So I DO get to my chosen Desktop & display without leaving keyboard, but it takes an extra keyboard step, and seems to require having that N+1 Desktop available to switch to. Obviously sub-optimal, but it does avoid using the mouse. Commented Oct 29, 2013 at 15:24
  • 3
    Sorry but I just tried it in El Capitan and it is not working :/ I can not change focus to my external display :/ Commented Oct 5, 2016 at 13:43
  • 12
    Doesn't really switch between displays in Mac OS Sierra...
    – Ardee Aram
    Commented Jan 16, 2017 at 2:59
24

Best solution I've found thus far is to install the free CatchMouse utility off the app store. It allows you to assign different keyboard shortcuts to "warp" the mouse pointer to the center of each monitor. In my case I've mapped my left hand monitor to Ctrl+⎇ Alt+, and the right one to Ctrl+⎇ Alt+.

Note: The link to CatchMouse has been updated to an unknown and untrusted source. Download and use at your own risk!

12
  • 2
    Lazy people can click here, all others need not apply: itunes.apple.com/us/app/catchmouse/id439700005?mt=12 Commented Nov 15, 2013 at 20:19
  • 2
    Hmmm, doesn't seem to be available in the US store currently. Commented Jul 29, 2014 at 19:31
  • 3
    Does anyone know where CatchMouse ended up or if there is an alternative? The link on the Mac App Store and the link to the developer in the comments here are all broken.
    – zaphoyd
    Commented Nov 19, 2015 at 15:20
  • 2
    Not available on our region? Why? :(
    – Ardee Aram
    Commented Jan 16, 2017 at 2:48
  • 3
    This github repo seems to host it. This is the best solution as of now, in my opinion. July, 2017 Commented Jul 10, 2017 at 17:15
24

I just found an open source window manager called slate.. From my point of view it's better than divvy and better than sizeup.. and it has a key binding for switching focus between screens. Its default key bindings are shown here (very customizable).. it defaults to~ and

bonus: here is my slate config file.. it can give you some ideas to get you started

update

From the comments I realized that my above answer isn't about switching focus, rather it's about throwing windows around from one monitor to another. That's not what the question was about.

This solution works assuming that you already have application windows already open in all your monitors..

Take a look at this screenshot to understand my solution (click on it to zoom):

enter image description here

scenario 1 i simply click on tab to switch between the applications (ie i switch from chrome which is on the already focused monitor to terminal which is on the monitor i want to focus on

scenario 2 I do the same simply by clicking on `, this makes me switch between windows of the same application.. in the example below i got chrome windows in all three monitors, so I simply go through them until I reach the window I want to switch focus to..

update 2: works using skhd + yabai

This solution requires that you install both yabai and skhd.

in your skhd config file put something like this (you can adjust the keybindings and focus numbers to your liking):

ctrl + alt - right : yabai -m display --focus 1
ctrl + alt - left : yabai -m display --focus 2
8
  • 2
    How did you get this to work? I've been playing with Slate, but it seems like those commands just give focus to the next window to the right or left of the current one. Are you able to get it to solve the problem from your original question? Commented Nov 4, 2014 at 1:05
  • yeah it did @shanebonham.. you just have to go through the config file and make sure you're doing the right command
    – abbood
    Commented Dec 4, 2014 at 13:22
  • 1
    I don't think this exists with slate currently - github.com/jigish/slate/issues/458 I would really like to see this as well.
    – notthehoff
    Commented Mar 21, 2016 at 14:53
  • 2
    @abbood This absolutely doesn't work, it's can change focus between apps but not between monitors, i've tries everything, and i've read the documentation.
    – Abude
    Commented Apr 23, 2016 at 21:22
  • 1
    Doesn't work for me. Not sure about the "working out of the box" experience. I am on Mac OS Sierra.
    – Ardee Aram
    Commented Jan 16, 2017 at 2:30
9

(This should be a comment but I don't have the reputation to post one.)

I have the same issue. I work almost exclusively in full-screen apps and switch between them with ctrl+◀︎ and ctrl+▶︎. I like to work on my primary monitor and use the secondary for Messages. But I don't want to leave Messages visible when I'm not using it; I would rather switch back to the Desktop on the secondary monitor. But to put focus on the secondary monitor, I have to move the mouse pointer, totally defeating the time and effort savings of using the keyboard shortcut for app switching.

For what it's worth, you don't have to click on anything to change focus to a different monitor. You only need to move your mouse pointer where you want focus.

4
  • 6
    yeah the point is to avoid using the mouse all together for such a common and basic operation
    – abbood
    Commented Oct 25, 2013 at 3:04
  • Any updates on this?
    – humble
    Commented Feb 8, 2021 at 20:31
  • 1
    @Flavin Not only that your comment deserves to be a full-blown answer – it is the best answer. Embarrassingly, it is the best answer almost 9 years after!! I am stuck with the exact same problem, and i see no solution other than installing a piece of software from the wild web, which is a no go for me. However, your last comment makes the whole business of moving the mouse 50% less painful! I'll have to settle for that. Thank you!
    – amka66
    Commented Feb 4, 2022 at 21:24
  • Thank you for pointing out that moving the mouse into a screen sets it into focus. For example, hitting Cmd+Space opens Spotlight in exactly that screen where your mouse is. However, if you start typing, sometimes my input is directed into the screen where the focus was (and apparently still is). Only clicking into anoter screen actually switches the focus.
    – WhatHiFi
    Commented Jun 4 at 10:48
6

I use Keyboard Maestro to do just this. I mapped the F16 thru F19 keys in this order.

F16 Left monitor move left

F17 Left monitor move right

F18 Right monitor move left

F19 Right monitor move right

I created 4 Keyboard Maestro Actions for this, one for each monitor and one for each direction. Here is the basic shortcut which gets adjusted accordingly:

  1. Move the mouse over to whichever monitor without clicking.

  2. Keystroke Ctrl-[left arrow] or [right arrow], depending.

Actually I changed the Keyboard Shortcut in System Preferences under mission control from:

Ctrl-Arrow to move left/right a space to:

Shift-Control-Option-Command left/right arrow to free up the simpler control arrows for other activities. I also changed the Keyboard Maestro Macro to reflect the change.

While at it I also have the following mission control operations.

F13 Show desktop

F14 Show application windows

F15 Mission Control

I have it set up for the mouse to stay on the changed monitor but it could easily be set to return to where it started from.

2
  • 4
    It took me a while to figure out how to get Keyboard Maestro to move the mouse to my laptop monitor, so in case anyone else is having trouble too, I got it working like this: just move at SCREEN(Internal,MidX), SCREEN(Internal,MidY) relative to the absolute position
    – Shevaun
    Commented Jan 9, 2014 at 3:53
  • 1
    This is the best answer, Keyboard Maestro is well developed, is currently supported on Sierra, and has so many powerful options to control the mouse, this is awesome!
    – chrismarx
    Commented Mar 6, 2017 at 16:23
5

Keyboard Maestro can help you do that.

In my case, I use CTRL + 0,1,2 to refer screen 0, 1, 2. Below is how I configure that. Also, 0,1,2 on number pad is close to your arrow keys, then you can use CTRL + arrows to switch windows on selected display.

Notice, I use click because I want to move the focus to the window under cursor.

mouse movement to select display

1
  • 2
    I used this tip to make it work for me for dual monitors. Here is what I did to add shortcut for my non main monitor. It only gives the option relative to main screen window. So to make the mouse move to the left display, I set the relative mouse position to -500. Commented Mar 13, 2018 at 17:53
1

Another option is the MacOS window manager inspired by xmonad called Amethyst which has some key-bindings (default) P and N to cycle the mouse pointer between screens. There's more it can do of course.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .