W-433: Replace the system emoji picker (⌃⌘Space + Globe key)#149
Merged
wr merged 1 commit intoJun 26, 2026
Merged
Conversation
Adds an opt-in feature that points ⌃⌘Space and a lone Globe/Fn key tap at Mojito's full-library emoji browser instead of the macOS Emoji & Symbols panel. Surfaced as a Raycast-style row in Quick Access settings plus an onboarding step. Split into two independent concerns: - Panel replacement: the browser hotkey owns ⌃⌘Space (registered via KeyboardShortcuts on the showEmojiBrowser Name) and the OS panel is best-effort suppressed via the private SkyLight CGSSetSymbolicHotKeyEnabled (hotkey 50), resolved by dlsym so a missing symbol no-ops instead of crashing. - Globe key: a lone fn down→up under 300ms with no intervening key fires the browser. Detected on KeyMonitor's existing flagsChanged stream. AppleFnUsageType is set to 0 so the OS stops claiming Globe (needs a logout to fully apply, surfaced in the UI); the prior value is stashed and restored on disable. Settings UI: - A "Replace System Picker" button claims ⌃⌘Space + the Globe key in one tap; reset restores the ⌃⌥Space default; the Globe key is also its own toggle. - ShortcutRecorder: a purpose-built NSViewRepresentable recorder. The KeyboardShortcuts library's Recorder misbehaved here (keys leaked into the field editor, chords didn't register), so this captures via keyDown on the responder chain. Native text-field styling + focus ring, a clear button, and click-away/Escape dismiss. Also reused for the pause-hotkey fields. - The CGEventTap is suspended while the Settings window is key so it doesn't compete with the recorder for keystrokes. The hotkey toggles the browser (a second press closes it), matching the panel. Refs: W-433
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Points ⌃⌘Space and a lone Globe/Fn key tap at Mojito's emoji browser instead of the macOS Emoji & Symbols panel. Opt-in, surfaced as a Raycast-style row in Quick Access settings and an onboarding step.
What's in it
CGSSetSymbolicHotKeyEnabled(hotkey 50), resolved bydlsymso a missing symbol no-ops instead of crashing.flagsChangedstream.AppleFnUsageType=0hands the key over (needs a logout to fully apply — surfaced in the UI); prior value stashed and restored on disable.ShortcutRecorder— the KeyboardShortcuts library'sRecordermisbehaved in this app (keys leaked into the field editor, chords didn't register), so this captures viakeyDownon the responder chain. Native text-field styling + focus ring, a clear (X) button, click-away/Escape dismiss. Reused for the pause-hotkey fields too.Test plan
scripts/run-tests.sh).Notes / risk
Refs W-433