Karabiner-Elements is a powerful and stable keyboard customizer for macOS.
Open Launchpad (or open Applications folder from Finder).
Then, click Karabiner-Elements.
An alert about kext policy will be shown since macOS High Sierra.
Click Open System Preferences > Security & Privacy button, then press Allow button.
Configure Karabiner-Elements from UI.
You can change a key to another key in Simple Modifications tab.
Karabiner-Elements provides more complex event modifications.
It changes keys according to the conditions.
|Modifier flags + key to keys||
|Key to modifier flags + keys||
|Post other key events when a key pressed alone||
|Change keys in specific apps||
|Execute shell command||
You can import predefined rules from the internet (or make your own rules).
Open Complex Modifications tab and press Add rule button, then press Import more rules from the internet button.
Or open this page.
A web browser is opened. Press Import button in the page.
A confirmation dialog is shown. Press Allow button.
Karabiner-Elements is shown again. Press Import button, then new rules are imported.
Press Enable button.
New rule is enabled.
Confirm the result in Karabiner-EventViewer.
Choose devices which Karabiner-Elements modifies events in Devices tab.
You can also disable MacBook built-in keyboard if external keyboards are connected in Devices tab.
You have to set keyboard type in Virtual Keyboard tab if you want to use ISO or JIS layout.
Quit from menu bar or Misc tab in Preferences.
Press the "Uninstall Karabiner-Elements" button in "Misc" tab.
You can check for updates from "Misc" tab.
If you want to use the latest beta version, use "Check for beta updates" button.
You can examine keyboard and mouse events by using EventViewer.
Launch Karabiner-EventViewer from Launchpad.
Input events will be shown when you type keyboard on EventViewer or press pointing buttons on Mouse Area.
EventViewer cannot show following shortcuts which will be grabbed by system.
You can switch profiles from menu bar.
Add profiles from Add profile button in Profiles tab.
Karabiner-Elements modifies following behavior automatically without any configurations:
When you are using multiple keyboards, modifier keys are shared with all keyboards.
For example, pressing "shift key on keyboard1" and "space key on keyboard2" sends shift-space.
Karabiner adds fn-key combinations:
Karabiner-Elements treats input events by the following order:
Karabiner-Elements provides a command line interface which allows you to select a profile. (karabiner_cli command)
$ '/Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_cli' --select-profile 'Default profile'
Karabiner-Elements stores configuration to a json file which is located ~/.config/karabiner/karabiner.json
If you want to move karabiner.json to another place and make symbolic link, link to ~/.config/karabiner directory.
$ mv ~/.config/karabiner ~/Dropbox/private $ ln -s ~/Dropbox/private/karabiner ~/.config
You have to restart karabiner_console_user_server process by the following command after you made a symlink in ordre to tell Karabiner-Elements that the parent directory is changed.
$ launchctl kickstart -k gui/`id -u`/org.pqrs.karabiner.karabiner_console_user_server
Preventing event leaks is one of the most important point of Karabiner-Elements architecture design.
Karabiner-Elements treats all input events in privileged process which is named karabiner_grabber in order to guard input events from other processes.
There is no way that malicious processes steal your input events from Karabiner-Elements.
Karabiner-Elements works with the following core components.
||Karabiner VirtualHIDDevice kernel extension||