2022-07-213712 chars
Karabiner-Elements Complex Modifications
Hardly any software uses a combination of 4 modifier keys (shift + control + option + command) for a shortcut, and it's hard to press all 4 keys at the same time,
With Karabiner-Elements I can change caps_lock to a hyper key to do this.
hyper key
Hold caps_lock to trigger shift + control + option + command modifier combo for various shortcuts, for example:
- caps_lock + h for Google Chrome
- caps_lock + j for iTerm
- caps_lock + k for Visual Studio Code
- caps_lock + l for Slack
- caps_lock + ; for Zoom
- For more examples check the
rules
in the JSON below with"description": "hyper-key"
Press caps_lock alone to lock / unlock caps.
How to Install
- Install Karabiner-Elements
- Create a JSON file
~/.config/karabiner/assets/complex_modifications/k-complex-mods.json
with the JSON below - Add the Complex Modifications rules in the Karabiner-Elements Preferences
click to show JSON
{
"title": "k-complex-mods",
"rules": [
{
"description": "hyper-key",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": { "optional": ["any"] }
},
"to": [
{
"key_code": "left_command",
"modifiers": ["left_shift", "left_control", "left_option"]
}
],
"to_if_alone": [{ "key_code": "caps_lock" }]
},
{
"type": "basic",
"from": {
"key_code": "f",
"modifiers": {
"mandatory": ["shift", "control", "option", "command"]
}
},
"to": [
{
"shell_command": "open -a 'Finder'"
}
]
},
{
"type": "basic",
"from": {
"key_code": "h",
"modifiers": {
"mandatory": ["shift", "control", "option", "command"]
}
},
"to": [
{
"shell_command": "open -a 'Google Chrome'"
}
]
},
{
"type": "basic",
"from": {
"key_code": "j",
"modifiers": {
"mandatory": ["shift", "control", "option", "command"]
}
},
"to": [
{
"shell_command": "open -a 'iTerm'"
}
]
},
{
"type": "basic",
"from": {
"key_code": "k",
"modifiers": {
"mandatory": ["shift", "control", "option", "command"]
}
},
"to": [
{
"shell_command": "open -a 'Visual Studio Code'"
}
]
},
{
"type": "basic",
"from": {
"key_code": "l",
"modifiers": {
"mandatory": ["shift", "control", "option", "command"]
}
},
"to": [
{
"shell_command": "open -a 'Slack'"
}
]
},
{
"type": "basic",
"from": {
"key_code": "semicolon",
"modifiers": {
"mandatory": ["shift", "control", "option", "command"]
}
},
"to": [
{
"shell_command": "open -a 'zoom.us'"
}
]
}
]
}
]
}