Skip to content

Remove duplicate global key monitor#2

Open
sickn33 wants to merge 1 commit into
chenyuxiaojin:mainfrom
sickn33:fix-remove-duplicate-key-monitor
Open

Remove duplicate global key monitor#2
sickn33 wants to merge 1 commit into
chenyuxiaojin:mainfrom
sickn33:fix-remove-duplicate-key-monitor

Conversation

@sickn33

@sickn33 sickn33 commented Jun 29, 2026

Copy link
Copy Markdown

Summary

  • remove the hard-coded Carbon/NSEvent global key monitor from MenuBarController
  • keep menu key equivalents and the existing configurable global shortcuts handled through KeyboardShortcuts

Why

AppDelegate already registers global shortcuts via KeyboardShortcuts.onKeyUp for showing the shelf, clipboard history, and settings. The extra NSEvent.addGlobalMonitorForEvents(matching: .keyDown) path duplicates two of those shortcuts, cannot respect user customization, and can increase privacy/App Store review risk because it globally observes keyboard events.

Verification

  • rg -n "addGlobalMonitorForEvents\\(matching: \\.keyDown|globalKeyMonitor|setupGlobalHotkeys|handleGlobalKeyEvent|Carbon|kVK_ANSI" DropKit/Sources returns no matches
  • xcodebuild test -project DropKit/DropKit.xcodeproj -scheme DropKit -destination 'platform=macOS' -derivedDataPath /private/tmp/dropkit-hotkey-derived CODE_SIGNING_ALLOWED=NO passed 11 tests, 0 failures

@sickn33 sickn33 force-pushed the fix-remove-duplicate-key-monitor branch from 63b344a to c71ea8d Compare June 29, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants