Skip to content

albertolicea00/SlowQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐌 SlowQ

Never quit an app by accident again. A tiny native macOS menu-bar app that intercepts ⌘Q (and other danger shortcuts) with a double-press or hold-to-confirm gate.

Platform macOS Swift License


✨ Features

  • πŸ›‘οΈ Guards ⌘Q out of the box β€” ⌘W ready with one toggle
  • 🎯 Custom danger commands β€” record any ⌘/βŒƒ/βŒ₯ combo
  • πŸ” Three confirmation modes β€” press twice, hold, or either
  • ⏱️ Adjustable timing β€” hold 0.5–5s, double-press window 0.5–3s
  • πŸ’¬ Native HUD overlay β€” tells you what's happening and which app is affected
  • πŸš€ Launch at login β€” enable from settings
  • πŸͺΆ Super light β€” single binary, pure AppKit + SwiftUI, zero deps, no dock icon

πŸ“‹ Requirements

  • macOS 13 Ventura or later
  • Xcode command-line tools (to build from source)

πŸ›‚ First Launch: Accessibility Permission

SlowQ intercepts keystrokes via a CGEvent tap, which requires Accessibility access.

  1. Launch SlowQ β€” you'll get a system prompt
  2. Go to System Settings β†’ Privacy & Security β†’ Accessibility
  3. Enable SlowQ

No relaunch needed β€” the guard activates the moment permission is granted. Until then, the menu bar shows a "Grant Accessibility Access…" shortcut.

⚠️ Rebuilding re-signs the binary, which can invalidate the grant. If ⌘Q stops working after a rebuild, remove and re-add SlowQ in the Accessibility list (or run tccutil reset Accessibility com.slowq.SlowQ).

βš™οΈ Settings

Open Settings… from the menu bar icon:

Setting What it does
Enable SlowQ Master switch
Confirm by Press twice / Hold / Either
Hold duration How long to hold before it fires
Second press within Time window between presses
Launch at login Register as a login item
Danger Commands Toggle ⌘Q/⌘W, add/remove custom shortcuts

🧠 How It Works

SlowQ installs a filtering CGEvent tap at the head of the session event queue. When a guarded shortcut is pressed, the event is swallowed before the frontmost app sees it, and a confirmation state starts. On the second press (or when the hold threshold is reached), SlowQ re-posts the original shortcut as a synthetic event tagged with a private marker, which the tap recognizes and passes through untouched.

Key design decisions:

  • Only exact modifier matches β€” βŒ˜β‡§Q (log out) is never caught by the plain ⌘Q guard
  • Character-based matching β€” ⌘Q works on non-US keyboard layouts
  • SlowQ never guards itself, and skips plain ⌘Q in Finder (which has no Quit)

πŸ“„ Project Info

🀝 Contributing β€” Bug reports, ideas, and PRs welcome. See CONTRIBUTING.md before opening one.

πŸ”’ Security β€” Found something sketchy? Report it privately via SECURITY.md.

πŸ“„ License β€” MIT, do whatever you want with it. See LICENSE.

About

🐌 Never quit an app by accident. A tiny macOS menu-bar app that intercepts ⌘Q with a double-press or hold-to-confirm gate.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Contributors