Use more complex rules
Karabiner-Elements provides more complex event modifications.
These rules change keys by conditions.
Examples
- Modifier flags + key to keys:
- Change control-m to return key.
- Change control-h to delete key.
- Key to modifier flags + keys:
- Change caps lock to command+control+option+shift key
- Post other key events when a key pressed alone:
- Post escape key when you press left control key alone.
- Change keys in specific apps:
- Change left command key to left control key in virtual machines.
- Execute shell command:
- Open Activity Monitor by right shift+a.
There are two ways to add rules
- Import predefined rules maintained by the community
- Create your own rules
In both cases, you can modify the rules later to make them more personalised.
Import predefined rules
Step 1
Open Complex Modifications tab and press Add predefined rule button, then press Import more rules from the internet button.
Official rules site will be open using your default web browser.
Step 2
Press Import button in the page.
A confirmation dialog is shown. Press Allow button.
Step 3
Karabiner-Elements is shown again.
Press Import button, then new rules are imported.
Step 4
Press Enable button.
Step 5
New rule is enabled.
Confirm the result using Karabiner-EventViewer.
Create your own rules
Step 1
Open Complex Modifications tab and press Add your own rule button.
Step 2
An editor will open with sample rules. Change the content and press the Save button to register.
When making changes, Karabiner-EventViewer and Karabiner Configuration Reference Manual can be used to confirm the key names and how to write rules.
Edit rules
Open Complex Modifications tab and press Edit button. The editor will open. Change the contents and save it.
When making changes, Karabiner-EventViewer and Karabiner Configuration Reference Manual can be used to confirm the key names and how to write rules.