A tiny macOS background utility. Every time you switch to another app, Latchkey forces the system keyboard input source back to the one you chose. Pick your default layout once and you'll always start typing in the right one.
No Accessibility permission required — it uses Text Input Sources
(TISSelectInputSource) and listens to app-activation notifications.
- Single window that is Settings + About at once.
- Picker listing only the input sources currently enabled in the system.
- "Launch at login" via
SMAppService. - Accessory app: no Dock icon, no menu bar (
LSUIElement). Single instance. - First launch shows the window to configure; login launches stay hidden.
- App icon built from the Icon Composer source (
Icons/latchkey.icon). - Pure AppKit + SwiftUI, no third-party dependencies.
Download the latest Latchkey-*.dmg, open it, and drag Latchkey.app into
Applications. Because the app is signed ad-hoc (no paid Apple Developer
account), the first launch needs one extra confirmation — see
INSTALL.md for the exact steps.
Requires Xcode 26 or newer (the app icon uses the Icon Composer .icon
pipeline, which actool only compiles on Xcode 26+). Targets macOS 13+.
Open Latchkey.xcodeproj in Xcode and press Run, or from the command line:
xcodebuild -project Latchkey.xcodeproj -scheme Latchkey -configuration Release build./package.sh # builds a universal Release app + dist/Latchkey-<version>.zip
./make-dmg.sh # wraps the built app into dist/Latchkey-<version>.dmgBoth produce an ad-hoc–signed, universal (arm64 + x86_64) build. To sign with a
Developer ID instead, set it in the target's Signing & Capabilities (or override
CODE_SIGN_IDENTITY / DEVELOPMENT_TEAM on the xcodebuild command).
Latchkey.xcodeproj— Xcode project (macOS app target).Sources/Latchkey/— Swift sources.Resources/Info.plist— bundle metadata (LSUIElement, version).Icons/latchkey.icon— Icon Composer source;actoolcompiles it into the app icon (ASSETCATALOG_COMPILER_APPICON_NAME = latchkey).package.sh/make-dmg.sh— build and packaging scripts.
MIT © Ruslan Black