Skip to content

ruslanblack69/latchkey

Repository files navigation

Latchkey

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.

Features

  • 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.

Install

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.

Build from source

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 for distribution

./package.sh     # builds a universal Release app + dist/Latchkey-<version>.zip
./make-dmg.sh    # wraps the built app into dist/Latchkey-<version>.dmg

Both 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).

Project layout

  • Latchkey.xcodeproj — Xcode project (macOS app target).
  • Sources/Latchkey/ — Swift sources.
  • Resources/Info.plist — bundle metadata (LSUIElement, version).
  • Icons/latchkey.icon — Icon Composer source; actool compiles it into the app icon (ASSETCATALOG_COMPILER_APPICON_NAME = latchkey).
  • package.sh / make-dmg.sh — build and packaging scripts.

License

MIT © Ruslan Black

Author

Ruslan Black 🖤

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors