Focus follows mouse on Mac: what it is and how to get it
by ZwayStudios5 min read
Focus follows mouse means the window under your pointer gets keyboard focus without a click. macOS supports it only in Terminal, through a hidden setting. To get it in every app you need a third party tool such as AutoRaise, Okie Dockie, or the optional Focus Window Under Pointer feature in Chrome Profile Switcher.
What focus follows mouse means
On a Mac, the app you last clicked has keyboard focus. Whatever you type goes there, even if your pointer is resting over a different window.
With focus follows mouse, focus moves with the pointer instead. Point at a window and it becomes the one you type into. People who come from Linux desktops often expect this, and people with large or multiple displays like it because they can move between side by side windows without an extra click.
There are two flavours:
- Focus and raise. The window under the pointer gets focus and also jumps to the front, on top of everything else.
- Focus without raise. The window gets focus but stays where it is in the stack. Other windows that overlap it stay on top.
The difference matters more than it sounds.
Why raising windows ruins it
Imagine a small notes window sitting on top of a large browser window. You move the pointer across the browser to reach the notes. With focus and raise, the browser jumps forward the moment your pointer crosses it and covers the notes window you were heading for.
Raising on hover makes windows shuffle every time the pointer travels across the screen. Most people who try it turn it off within a day. Focus without raise avoids that: the layout stays put and only the keyboard target changes. That is why the tools below either focus without raising or let you add a delay before anything happens.
The built in option: Terminal only
Apple’s Terminal app has focus follows mouse built in, but it is off and hidden. Open Terminal and run:
defaults write com.apple.Terminal FocusFollowsMouse -bool true
Then quit Terminal completely (⌘ Q) and open it again. Now, if you have several Terminal windows open, the one under your pointer receives your typing.
This only works between Terminal windows. It does nothing in Finder, Chrome or any other app. To turn it off again, run the same command with false in place of true and restart Terminal.
Tools that add it to every app
AutoRaise
AutoRaise is a free, open source tool. It focuses the window under the pointer, with a delay you can configure, and it can be set to focus without raising. It is a good choice if you want a small, dedicated tool and you are comfortable reading its options.
Okie Dockie
Okie Dockie is a menu bar app whose free features include focus follows mouse without raising, along with click through. It also bundles snap layouts, a window switcher and other window tools, so it suits people who want many window features in one app. See our Okie Dockie comparison.
Chrome Profile Switcher: Focus Window Under Pointer
Chrome Profile Switcher is our app. Its main job is giving each browser profile its own Dock icon, but version 1.5.0 adds an optional feature called Focus Window Under Pointer.
When it is on, rest the pointer on any window in any app and that window gets keyboard focus without being raised. Your first click then lands on what you clicked, instead of only activating the window.
It is built to stay out of the way:
- It is off by default. Turn it on from the menu bar icon or in Settings.
- It waits for the pointer to move and then rest, so passing over a window on the way somewhere else does nothing.
- It never acts while a mouse button is held down, so drags are safe.
- It never acts while a menu is open.
- It ignores the Dock, the menu bar, Mission Control, Spotlight and notifications.
How to try each one safely
Focus follows mouse changes a habit you use hundreds of times a day, so ease into it.
- Try one tool at a time. Two apps that both move focus will fight each other. Turn off one before you test another.
- Start with focus without raise. If a tool offers raising, leave it off at first.
- Add a delay if it feels jumpy. A short pause before focus moves stops it from firing as you cross windows.
- Test your everyday flows. Drag a file between two windows, use a menu, type in a small window sitting on top of a big one.
- Know how to turn it off. For Terminal, run the
falsecommand. For the apps, find the toggle before you need it. In Chrome Profile Switcher it is one click in the menu bar.
These tools need the macOS Accessibility permission, since they have to move focus between other apps’ windows. Chrome Profile Switcher already asks for Accessibility on first launch for its Dock icons, so the feature needs nothing extra.
If the reason you want this is the annoying double click on background windows, read why you have to click twice on a Mac.
Questions
Does macOS have focus follows mouse built in?
Only in Terminal, and only between Terminal windows. You turn it on with a defaults write command and restart Terminal.
What is the difference between focus and raise? Focus decides which window receives your typing. Raise brings a window to the front. Focus without raise changes the typing target but leaves your window layout alone.
Is Focus Window Under Pointer on by default? No. It is off until you turn it on from the Chrome Profile Switcher menu bar icon or its Settings.
Can I use AutoRaise and Chrome Profile Switcher’s feature together? It is best not to. Two tools moving focus at the same time can conflict. Pick one and keep the other’s focus feature off.