S Stephane Poulin Back to projects
Published Project

HocusFocus

A macOS menu bar app where the focus follows your mouse. Rest the mouse on a window and it gets the keyboard focus, without coming to the front: the window you were reading stays in view, and you can type right away.

Requires
macOS 13
Runs on
Apple silicon, Intel
Permission
Accessibility
Price
Free
If the video does not load here, watch it on YouTube.

What It Does

Focus without raising

Rest the mouse on a window: it gets the keyboard focus and stays where it is in the stack of windows.

Type right away

No click needed: what you type goes to the window under the mouse, even when it is partly hidden.

Pause while typing

While you type, a nudge of the mouse won't move the focus. Hold ⌃, or another key of your choice, to pause it.

Menus and settings respected

An open menu, dialog or settings window keeps the focus, and coming back to an app gives the focus back to its open settings.

Your apps

Works with all apps, all except the ones you check, or only the ones you check.

Or focus and raise

Prefer the classic way? One menu choice brings each window to the front as it gets the focus.

About This Project

On a Mac, the keyboard goes to the window you click, and the click also brings that window to the front, over the one you were reading. HocusFocus gives the focus to the window under the mouse instead, and leaves every window where it is.

It lives in the menu bar, where you set the delay, the pause key, the apps it works with, and the mode.

Built With

  • Swift
  • AppKit
  • Quartz event tap
  • Accessibility API
  • SkyLight

Focus without raising uses private SkyLight calls, loaded at run time; if a macOS update removes them, the app falls back to a classic raise. The app icon is drawn with Core Graphics.

Permissions

To follow the mouse and give the focus to a window, the app needs the Accessibility permission, granted once in System Settings › Privacy & Security › Accessibility.

Get It

The download is a disk image for Apple silicon and Intel Macs; the repository's README shows how to open it the first time and allow Accessibility. Or build and install it with ./build.sh from the repository: it needs the Xcode command line tools.

Version History

1.2.0

  • A ring where the pointer lands. After HocusFocus moves the pointer, a ring closes on it, so your eye finds it right away. A menu item turns it off.

1.1.0

  • Pointer follows your switch. When you switch apps with ⌘Tab, a shortcut or the Dock, the pointer moves to the app's window, so the focus doesn't jump back to the window that was under it.
  • Pointer on new windows. When an app opens a window that takes the focus, like its settings or a dialog, the pointer moves onto it, even from a menu bar app.
  • Two menu items turn each of these off.

1.0.0

  • First public release, as a download for Apple silicon and Intel Macs.

All release notes on GitHub

More Projects