Automatically switches your macOS keyboard input source (language/layout) when you switch between physical keyboards.
| macOS | 15 Sequoia or 26 Tahoe |
| Hardware | Apple Silicon (M1 or newer) — Intel Macs not supported |
| Architecture | arm64 only |
If you are on an older macOS version or Intel Mac, this project will not work.
brew tap jakguel/autokeyboardlang
brew install --cask autokeyboardlangDownload the latest .dmg from the Releases page, open it and drag autokeyboardlang.app to /Applications/.
Note: The app is ad-hoc signed. On first launch macOS may show a security warning — go to System Settings → Privacy & Security → Open Anyway.
Open /Applications/autokeyboardlang.app — the tray icon guides you through Input Monitoring setup and autostart.
brew upgrade --cask autokeyboardlangRequires a full Xcode.app installation:
git clone https://github.com/jakguel/autokeyboardlang
cd autokeyboardlang
swift build --configuration release- Type a few keys on your first keyboard so it becomes the active keyboard
- Switch to the desired layout via the menu bar or 🌐
- Repeat for each keyboard you use
The layout switches after the first keystroke when changing keyboards.
autokeyboardlang list # show all known devices and their status
autokeyboardlang enable <device> # enable switching for a device
autokeyboardlang disable <device> # disable switching for a device
autokeyboardlang clear # reset all stored mappings<device> is either the number from list or the full device identifier.
Options: --verbose 1|2 (debug/trace output), --location (include USB port in device ID)
Not switching after install
Autostart is managed by the tray menu. Click Autostart disabled — click to enable in the tray menu to enable launch-at-login.
If Input Monitoring permission is needed, add the app under System Settings → Privacy & Security → Input Monitoring:
/Applications/autokeyboardlang.app/Contents/MacOS/autokeyboardlang
Logitech device not detected correctly
Some Logitech devices misidentify as keyboard or mouse. Use autokeyboardlang enable or autokeyboardlang disable to correct this manually.
Not compatible with:
- macOS "Automatically switch to a document's input source" (System Settings → Keyboard → Input Sources → Edit…)
- Karabiner-Elements — proxies keyboard events, hiding the real device from autokeyboardlang
Originally developed by Jean Helou. Extended by ohueter. Further developed by Jiyan Akgül.