Skip to main content

Minimum requirements

HopTab requires the following to run:
  • macOS 14.0 (Sonoma) or later
  • Accessibility permission (prompted on first launch)
HopTab uses Swift 5.9 and is built with Xcode 15+. You only need to know this if you’re building from source.

Building from source

If you want to build HopTab from source instead of downloading the pre-built binary, you need:
  • Xcode 15 or later
  • macOS 14.0 (Sonoma) or later
git clone https://github.com/royalbhati/HopTab.git
cd HopTab
open HopTab.xcodeproj
Then press Cmd+R to build and run.

Permissions

Accessibility permission

HopTab requires Accessibility permission to:
  • Detect global keyboard shortcuts (Option+Tab, Option+`)
  • Switch between your pinned apps
  • Raise windows to the front when activated
The app prompts you for this permission on first launch. You’ll see a system dialog asking you to grant access.
Without Accessibility permission, HopTab cannot function. The global shortcuts won’t work and the event tap will fail to start.

How to grant Accessibility permission

  1. Launch HopTab for the first time
  2. A system dialog will appear asking for Accessibility access
  3. Click Open System Settings
  4. In System Settings > Privacy & Security > Accessibility, toggle HopTab on
  5. Return to HopTab — it will automatically detect the permission and start working
If you missed the prompt or need to enable it later:
  1. Open System Settings
  2. Go to Privacy & Security > Accessibility
  3. Click the + button and add HopTab
  4. Toggle HopTab on
HopTab polls for permission changes every second until Accessibility access is granted. Once enabled, the app starts immediately.

Why Accessibility is required

HopTab uses a CGEvent tap to intercept global keyboard events. This is required to:
  • Swallow the shortcut so it doesn’t reach other apps (e.g., prevent Cmd+Tab from triggering the native app switcher)
  • Detect modifier key state in real-time (when you hold Option and when you release it)
  • Cancel on Escape to dismiss the switcher without activating an app
MacOS only allows event taps when the app has Accessibility permission. This is a security feature to prevent malicious apps from keylogging.
NSEvent.addGlobalMonitorForEvents can listen to global events, but it cannot swallow them. That means the shortcut would still reach other apps, and the native Cmd+Tab would still trigger alongside HopTab.CGEvent.tapCreate is the only API that lets you intercept and suppress keyboard events, which is critical for a custom app switcher.

No App Sandbox

HopTab does not run in the macOS App Sandbox. This is intentional:
  • CGEvent.tapCreate(.defaultTap) requires raw event access, which is incompatible with the sandbox
  • App Sandbox would prevent the event tap from starting
Because of this, HopTab is ad-hoc signed (not Apple notarized). When you first download it, macOS will show a warning: “Apple could not verify HopTab”. To bypass this:
xattr -d com.apple.quarantine /Applications/HopTab.app
This clears the Gatekeeper quarantine flag. HopTab is open source, so you can verify the code yourself before running it.
The xattr command is safe and only removes the macOS quarantine flag. It doesn’t disable any security checks — it just tells macOS you trust this specific app.

Build docs developers (and LLMs) love