Skip to content

Repository files navigation

Keychange icon

Keychange

One layout per keyboard.
A macOS menu bar app that switches the input source automatically when you switch keyboards.

Website · Download · Changelog · Issues

One text field, three keyboards: “Hello!” typed on a Keychron K2 set to U.S., “Grüße!” on the built-in keyboard set to German, and “안녕!” on MX Keys set to 2-Set Korean. The menu bar badge changes from EN to DE to KO as each keyboard is used, the popover marks the one being typed on, and a loupe magnifies the badge.

macOS can switch input sources per app or with a shortcut — but never per keyboard. If your keyboards have different layouts, you end up switching by hand every time you move between them. Keychange does it for you: assign a layout to each keyboard once, and it switches the moment you start typing on that device.

Features

  • Automatic switching — the input source follows whichever keyboard you type on
  • Per-keyboard mappings — pick a layout for each keyboard, or leave one alone
  • Menu bar badge — always see the active input source at a glance
  • Remembers your keyboards — mappings survive unplugging and reconnecting
  • Private by design — keystrokes are only checked for which device they came from; nothing is recorded or sent anywhere

Install

Download Keychange.dmg, drag Keychange.app into /Applications, and launch it.

Or with Homebrew:

brew tap dennistimmermann/tap
brew install --cask keychange

Keychange asks for Input Monitoring permission so it can detect which keyboard you're typing on.

Using it

Click the menu bar icon to see your connected keyboards. Each one gets a dropdown, and the switch in the header turns Keychange off.

Tip: option-click the menu bar icon to see each keyboard's vendor and product ID — handy when two keyboards have similar names.

The dropdown next to a keyboard

Choice What it does
Input sources Every layout you have enabled in System Settings. Pick the one that fits your keyboard.
Don't switch Keychange leaves the input source as is while you type on this keyboard.
Hidden The keyboard drops out of the list, and stops switching with it. For the mice and dongles that report themselves as keyboards. Option-click the menu bar icon, or open the settings, to bring it back.

Settings

Setting What it does
Switch layout Which side of the key event the switch lands on. After key press: detection happens just after a key has been sent, so the very first character still prints in the old layout. Before key press: Keychange intercepts the key press and changes the layout on the fly — every key press in every app except password fields passes through it. Needs the Accessibility permission.
On external layout change What Keychange does when something else changes the input source. Disable: off until you turn it back on. Pause: off, then back on by itself once the input source matches your keyboard again. Ignore: your choice stands until you switch keyboards. Reset: your choice stands until your next key press.
Check for updates automatically Looks for new releases on GitHub and offers to install them. This check is the only network request the app makes.
Launch at login Starts Keychange when you log in.

Building

Requires Xcode 26 and macOS 14 or later.

git clone https://github.com/dennistimmermann/keychange.git
cd keychange
xcodebuild -project Keychange.xcodeproj -scheme Keychange -configuration Release build

An IOHIDManager watches keyboard devices and reports which one produced each key event; a device change looks up that keyboard's mapping and calls TISSelectInputSource. Because the keystroke and the switch race each other, the first character normally still belongs to the old layout — that is what "Switch layout → Before key press" fixes, using a CGEventTap that re-translates the character with the target layout (UCKeyTranslate), or briefly withholds the key press when switching to an input method that composes from key codes at delivery time.

Tagging a commit vX.Y.Z and pushing the tag builds that version and attaches it to a GitHub release.

Support

Bugs and requests go to Issues.

Keychange is free and stays free. If it saved you some friction, you can leave a tip on Ko-fi or sponsor me on GitHub.

Credits

Inspired by autokbisw by @ohueter and @jeantil, a command-line tool that solves the same problem.

Automatic updates are powered by Sparkle, MIT licensed.

MIT © 2026 Dennis Timmermann

About

One layout per keyboard — a macOS menu bar app that switches the input source when you switch keyboards.

Topics

Resources

Stars

Watchers

Forks

Releases

Sponsor this project

Contributors

Languages