Last active
May 24, 2024 11:32
-
-
Save ilyeshammadi/a021cfb28465f20fde2dd59cba773e4d to your computer and use it in GitHub Desktop.
Karabiner Mappings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Change caps_lock to Esc and Control", | |
"rules": [ | |
{ | |
"description": "Post Esc if Caps is tapped, Control if held.", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_control", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_control", | |
"lazy": true | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "escape" | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "left_option + hjkl to Arrow Keys Vim", | |
"rules": [ | |
{ | |
"description": "left_option + hjkl to arrow keys Vim", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "h", | |
"modifiers": { | |
"mandatory": [ | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow" | |
} | |
], | |
"type": "basic", | |
"to_if_alone": [ | |
{ | |
"key_code": "left_option" | |
} | |
] | |
}, | |
{ | |
"from": { | |
"key_code": "j", | |
"modifiers": { | |
"mandatory": [ | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "down_arrow" | |
} | |
], | |
"type": "basic", | |
"to_if_alone": [ | |
{ | |
"key_code": "left_option" | |
} | |
] | |
}, | |
{ | |
"from": { | |
"key_code": "k", | |
"modifiers": { | |
"mandatory": [ | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "up_arrow" | |
} | |
], | |
"type": "basic", | |
"to_if_alone": [ | |
{ | |
"key_code": "left_option" | |
} | |
] | |
}, | |
{ | |
"from": { | |
"key_code": "l", | |
"modifiers": { | |
"mandatory": [ | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow" | |
} | |
], | |
"type": "basic", | |
"to_if_alone": [ | |
{ | |
"key_code": "left_option" | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Tab or Option if hold", | |
"rules": [ | |
{ | |
"description": "Tab or Option if hold", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "tab", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_option", | |
"lazy": true | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "tab" | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The previous files are for the complext modifications section in Karabinier. | |
We also need to set a simple modificiation, which to set `caps_lock` -> `left_control` for this to work. | |
The order of the complex must of the following, otherwise some mapping will not work as expected: | |
Order from top to bottom in the Karabinier UI. | |
1. custom-capslock.json | |
2. custom-tab.json | |
3. custom-left_option.json | |
these files should be placed in `.config/karabiner/assets/complex_modifications/` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment