Xcode's type-to-filter menus are built into AppKit — enable them in any app with one defaults command
zats · x · 2026-10-18
Developer zats set out to rebuild Xcode's type-to-filter menus, only to discover the feature is already built into AppKit (spotted in macOS 27+). Any NSMenu can get it: the simplest route is defaults write <app-bundle-id> NSMenuUseFilteringByDefault -bool YES, which works code-free for apps with 6+ menu items. Alternatively, use the private API — guard on responds(to: Selector(("setTypingBehavior:"))), set typingBehavior to 2 for filtering or 3 for selecting, and hook NSMenu.didBeginTrackingNotification to recursively apply it to every menu in the app, SwiftUI included. Caveat: filtering only works well on first-level menu items.
More from coding & agent
- SpudStack on Grok Bot marketplace: a rigor reviewer for coding agents — alexcovo_eth · 2026-10-18
- OSS AI search XERJ hits 2,000 daily installs in 3 months, GitHub Rust #1 — alexcovo_eth · 2026-10-18
- Feeding an 1883 ornament design classic to AI yields striking structural analysis — debreuil · 2026-10-18
- Formal Verification of LLM-Generated Code: Slides from FATTW 2026 Talk — CatAstro_Piyush · 2026-10-18
- Indie dev's Qiaomu Obsidian plugin suite tops 20,000 downloads, Agent plugin surging — vista8 · 2026-10-18
- Zeno's paradox, agent edition: Sol does half the task, then writes 'gates' reports — max_paperclips · 2026-10-18