Last active
April 30, 2022 00:49
-
-
Save brisbanewebdeveloper/ccaa9255a15bb6703089617459ef38ba to your computer and use it in GitHub Desktop.
CTRL key based operation with Karabiner-Elements
This file contains hidden or 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
| .history | |
| .vscode | |
| save.sh |
This file contains hidden or 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": "Use Option as Command for some applications", | |
| "rules": [ | |
| { | |
| "description": "Use Option as Command for some applications", | |
| "manipulators": [ | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "tab", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_shift", | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "open_bracket", | |
| "modifiers": [ | |
| "left_shift", | |
| "left_command" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "tab", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "close_bracket", | |
| "modifiers": [ | |
| "left_shift", | |
| "left_command" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "f", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "f", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_unless", | |
| "bundle_identifiers": [ | |
| "^com.googlecode.iterm" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "x", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "x", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "p", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "p", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "n", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "n", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "q", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "q", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "z", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "z", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_unless", | |
| "bundle_identifiers": [ | |
| "^com.googlecode.iterm" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "z", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_shift", | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "z", | |
| "modifiers": [ | |
| "right_shift", | |
| "right_command" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "c", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "c", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_unless", | |
| "bundle_identifiers": [ | |
| "^com.googlecode.iterm", | |
| "^com.microsoft.VSCode" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "v", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "v", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "a", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "a", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_unless", | |
| "bundle_identifiers": [ | |
| "^com.googlecode.iterm", | |
| "^com.microsoft.VSCode" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "s", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "s", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "t", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "t", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.cocoatech.PathFinder-setapp", | |
| "^com.microsoft.edgemac", | |
| "^com.google.Chrome", | |
| "^com.googlecode.iterm" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "l", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "l", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.microsoft.edgemac", | |
| "^com.google.Chrome" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "n", | |
| "modifiers": { | |
| "mandatory": [ | |
| "left_shift", | |
| "left_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "n", | |
| "modifiers": [ | |
| "left_shift", | |
| "left_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.microsoft.edgemac", | |
| "^com.google.Chrome" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "g", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "g", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.microsoft.edgemac", | |
| "^com.google.Chrome" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "u", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "u", | |
| "modifiers": [ | |
| "left_option", | |
| "left_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.microsoft.edgemac", | |
| "^com.google.Chrome" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "h", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "y", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.google.Chrome" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "y", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "y", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.microsoft.edgemac" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "w", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "w", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "slash", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "slash", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.install4j.[-0-9]+.[-0-9]+$", | |
| "^com.microsoft.VSCode" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "r", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "r", | |
| "modifiers": [ | |
| "right_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.microsoft.edgemac", | |
| "^com.google.Chrome" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "period", | |
| "modifiers": { | |
| "mandatory": [ | |
| "control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "period", | |
| "modifiers": [ | |
| "command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.microsoft.VSCode" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "p", | |
| "modifiers": { | |
| "mandatory": [ | |
| "left_shift", | |
| "left_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "p", | |
| "modifiers": [ | |
| "left_shift", | |
| "left_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.microsoft.VSCode" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "y", | |
| "modifiers": { | |
| "mandatory": [ | |
| "right_shift", | |
| "right_control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "y", | |
| "modifiers": [ | |
| "right_shift", | |
| "right_command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.microsoft.VSCode" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "k", | |
| "modifiers": { | |
| "mandatory": [ | |
| "control" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "k", | |
| "modifiers": [ | |
| "command" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.tinyspeck.slackmacgap" | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "p", | |
| "modifiers": { | |
| "mandatory": [ | |
| "left_ctrl", | |
| "left_shift" | |
| ], | |
| "optional": [ | |
| "any" | |
| ] | |
| } | |
| }, | |
| "to": [ | |
| { | |
| "key_code": "p", | |
| "modifiers": [ | |
| "left_command", | |
| "left_shift" | |
| ] | |
| } | |
| ], | |
| "conditions": [ | |
| { | |
| "type": "frontmost_application_if", | |
| "bundle_identifiers": [ | |
| "^com.microsoft.VSCode" | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Used for the post CTRL key based operation with Karabiner-Elements.