Skip to content

Instantly share code, notes, and snippets.

@jakub-g
Last active November 25, 2022 19:35
Show Gist options
  • Save jakub-g/728b92c1a4c669e09102c9e8ccffdaf1 to your computer and use it in GitHub Desktop.
Save jakub-g/728b92c1a4c669e09102c9e8ccffdaf1 to your computer and use it in GitHub Desktop.
Karabiner-Elements: Remap cmd-capslock to cmd-backtick(tilde) (Switch window within an app)

What this rule does

On MacOS, cmd-tab only toggles between different apps. To toggle between different windows of the same app, you need to use cmd-` . However this is cumbersome for regular usage, as it requires stretching your fingers unnaturally. This rule allows to use cmd-CapsLock instead, which is much easier.

To enable the rule

  • Install Karabiner Elements and give it all permissions it asks for
  • cd ~/.config/karabiner/assets/complex_modifications and put the json file below there
  • Restart Karabiner Elements
  • Go to "Complex Modifications > Add rule"

image

- Enable the rule

image

{
"title": "cmd-capslock to cmd-tilde (switch between windows of the same app)",
"rules": [
{
"description": "cmd-capslock to cmd-tilde",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": {
"mandatory": ["left_command"]
}
},
"to": [
{
"key_code": "grave_accent_and_tilde",
"modifiers": "left_command"
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment