Input Monitoring permission seems broader than needed
- Dominant language
- Swift
- Stars
- 2.9k
- Forks
- 226
- PR merge metrics
- No merged PRs in 30d
Description
I noticed that Hex asks for Input Monitoring permission, but other macOS apps that offer the same kind of global hotkey functionality don't seem to need it. This feels like more access than necessary, so I had an AI look into it. Sharing the findings below in case it's worth revisiting.
## AI Analysis
Hex creates its event tap with `CGEvent.tapCreate(tap: .cghidEventTap, ...)`. HID-level taps require Input Monitoring (TCC `kTCCServiceListenEvent`). A session-level tap (`CGSessionEventTap`) requires only Accessibility — and supports all the features Hex uses: modifier-only hotkeys, Fn key, press/release events, and event suppression. The `handy-keys` Rust crate (used in another macOS app) demonstrates this works in practice with `CGEventTapLocation::SessionEventTap`. There appears to be no functional reason the HID-level tap is needed here.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the Hex code that calls CGEvent.tapCreate(...); compare its .cghidEventTap usage with the session-level event tap behavior described in the issue. Verify modifier-only hotkeys, Fn, press/release events, and event suppression still work, and confirm the app requests only the necessary macOS permission.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- desktop, operating-systems, security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100