Focus followsmouse on Mac?

October 13, 2026 · by Talha Bekci, maker of KeyFollow

Short answer: no. Unlike many Linux desktops, macOS has no setting that gives a window keyboard focus when the pointer moves over it. Focus changes when you click, switch apps, or use a shortcut.

One common explanation is the Mac's single menu bar at the top of the screen: on the way up to the menu, the pointer crosses other windows, and with focus-follows-mouse the menu would change under you. Whatever the reason, here are your options.

The one built-in option: Terminal

Apple's Terminal has a hidden preference that works between Terminal windows only:

defaults write com.apple.Terminal FocusFollowsMouse -bool true

Quit and reopen Terminal. Turn it off again with -bool false.

AutoRaise (free, open source)

AutoRaise gives focus to the window under the pointer, and can raise it too, after a configurable delay. It works across all apps and screens and is the closest thing to a system-wide setting. Start with a delay of a few hundred milliseconds so focus doesn't flicker as the pointer passes by.

Tiling window managers

  • Amethyst has a Focus follows mouse option in its settings.
  • yabai supports yabai -m config focus_follows_mouse autofocus (focus only) or autoraise (focus and raise).

Both change how your whole desktop is arranged, so they're best if you want tiling anyway.

Hammerspoon

With Hammerspoon you can script your own version, for example focusing the window under the pointer only when it crosses to another screen. That avoids the main annoyance of classic focus-follows-mouse, where focus jumps as the mouse drifts.

Is focus-follows-mouse what you actually want?

On a single screen it's a matter of taste. With two or three monitors, what people usually want is narrower: when I turn to the other screen, my typing should go there. The pointer is a stand-in for that, and you still have to move it first.

That's the idea behind KeyFollow: focus follows your head, not the mouse. It uses the Mac's camera, on-device, to notice which screen you turn to, and moves keyboard focus and the pointer there. Quick glances are ignored, and it never switches while you're typing. Frames are analyzed in memory and never stored.

More ways to move focus between screens: How to switch keyboard focus between monitors on a Mac.

Let your keyboard follow your head

KeyFollow notices which screen you turn to — with your Mac's camera, on-device — and moves keyboard focus there. No clicking, no shortcuts. Free for 7 days.

Download free trial How it works