Focus follows mouse on Mac: what works, and what to use instead
Linux and Windows users expect the window under the pointer to take keyboard focus. macOS doesn't do it. Here are your options.
On many Linux desktops you can turn on focus follows mouse: move the pointer over a window and it gets keyboard focus, no click needed. Windows has a similar hidden option. Search for how to do it on a Mac and you'll find forum threads going back fifteen years.
Why macOS doesn't have it
On a Mac, the menu bar belongs to the frontmost app and sits at the top of the screen. To reach it, the pointer often has to cross other windows. If focus followed the mouse, those windows would take focus on the way and the menu bar would change under you. So macOS has always used click to focus, and still has no system-wide setting.
Your options
Terminal: a hidden setting
Apple's Terminal has one, for its own windows only:
defaults write com.apple.Terminal FocusFollowsMouse -bool true
Quit and reopen Terminal. Hovering over a Terminal window now focuses it. To undo it, run the same command with false.
iTerm2: built in
iTerm2 has a Focus follows mouse option in its settings under Pointer. It applies to iTerm2 windows and split panes, which is handy if most of your work is in the terminal.
AutoRaise: every app
AutoRaise is a small free, open-source tool that focuses (and optionally raises) the window under the pointer after a short delay. It's the closest thing to the Linux behavior across all apps. The delay matters: set it too short and windows jump forward as you move the mouse across the screen.
yabai: part of a tiling window manager
If you already use the yabai tiling window manager, it has a setting for this:
yabai -m config focus_follows_mouse autofocus
Use autoraise instead to bring the window to the front as well. yabai is a big tool to install just for this, and some of its features need parts of System Integrity Protection turned off. How it compares with AeroSpace is in Mac window management.
The catch with all of them
Focus follows mouse fixes the click, not the reach. You still have to move the mouse to the window you want before typing, which on a multi-monitor setup means dragging the pointer across a whole screen. And the pointer is often left sitting over a window you aren't using, which then takes focus by accident.
What you actually want is for focus to follow your attention. You already look at a window before you type into it.
Focus follows your eyes
Glance Switch is a menu bar app that does that. It uses your Mac's camera to notice which screen you're facing and moves keyboard focus there. On the same screen, it can focus the window or split pane you're looking at. There's no mouse movement and no click.
| Focus follows mouse | Glance Switch | |
|---|---|---|
| What moves focus | The pointer | Where you're facing |
| Hands | On the mouse | Stay on the keyboard |
| Accidental switches | Pointer passing over windows | Ignores quick glances; waits while you type or use the mouse |
| Multiple monitors | Drag the pointer across | Turn your head |
You can still use both. Glance Switch doesn't move focus while you're using the mouse or trackpad, so the pointer stays in charge whenever your hand is on it. It works with the apps you use every day: terminals like iTerm2, Ghostty and Warp; editors like VS Code, Cursor and Zed; and every other app as whole windows. For split panes, see how to focus split panes without clicking.
Common questions
Does macOS have focus follows mouse?
No. There's no system-wide setting. Terminal and iTerm2 have options for their own windows, and third-party tools like AutoRaise and yabai add it for every app.
How do I turn on focus follows mouse in Terminal on Mac?
Run defaults write com.apple.Terminal FocusFollowsMouse -bool true in Terminal, then quit and reopen it. It only applies to Terminal's own windows.
Is there an alternative to focus follows mouse on Mac?
Yes. Instead of following the pointer, focus can follow where you look. Glance Switch uses your Mac's camera to move keyboard focus to the screen, window or split pane you're facing, with no mouse movement.