Created
April 20, 2018 16:58
-
-
Save yspreen/61c2f9f645f7604e8647910da9216ddc to your computer and use it in GitHub Desktop.
Karabiner configuration for Windows keyboard features
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": "PC Style", | |
"rules": [ | |
{ | |
"description": "Home / End (except Chrome, Code, iTerm, Terminal and vim)", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "home" | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow", | |
"modifiers": [ | |
"left_command" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_unless", | |
"bundle_identifiers": [ | |
"^org\\.vim\\.", | |
"^com.googlecode.iterm2", | |
"^com.microsoft.VSCode", | |
"^com.google.Chrome", | |
"^com.apple.Terminal" | |
] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "home", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow", | |
"modifiers": [ | |
"left_command", | |
"left_shift" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_unless", | |
"bundle_identifiers": [ | |
"^org\\.vim\\.", | |
"^com.googlecode.iterm2", | |
"^com.microsoft.VSCode", | |
"^com.google.Chrome", | |
"^com.apple.Terminal" | |
] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "end" | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": [ | |
"left_command" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_unless", | |
"bundle_identifiers": [ | |
"^org\\.vim\\.", | |
"^com.googlecode.iterm2", | |
"^com.microsoft.VSCode", | |
"^com.google.Chrome", | |
"^com.apple.Terminal" | |
] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "end", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": [ | |
"left_command", | |
"left_shift" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_unless", | |
"bundle_identifiers": [ | |
"^org\\.vim\\.", | |
"^com.googlecode.iterm2", | |
"^com.microsoft.VSCode", | |
"^com.google.Chrome", | |
"^com.apple.Terminal" | |
] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Ctrl + Left/Right (except Chrome, Code, iTerm, Terminal and vim)", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "delete_or_backspace", | |
"modifiers": { | |
"mandatory": [ | |
"left_command" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "delete_or_backspace", | |
"modifiers": [ | |
"left_control" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_unless", | |
"bundle_identifiers": [ | |
"^org\\.vim\\.", | |
"^com.googlecode.iterm2", | |
"^com.microsoft.VSCode", | |
"^com.google.Chrome", | |
"^com.apple.Terminal" | |
] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "right_arrow", | |
"modifiers": { | |
"mandatory": [ | |
"left_command" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": [ | |
"left_control" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_unless", | |
"bundle_identifiers": [ | |
"^org\\.vim\\.", | |
"^com.googlecode.iterm2", | |
"^com.microsoft.VSCode", | |
"^com.google.Chrome", | |
"^com.apple.Terminal" | |
] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_arrow", | |
"modifiers": { | |
"mandatory": [ | |
"left_command", | |
"left_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow", | |
"modifiers": [ | |
"left_control", | |
"left_shift" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_unless", | |
"bundle_identifiers": [ | |
"^org\\.vim\\.", | |
"^com.googlecode.iterm2", | |
"^com.microsoft.VSCode", | |
"^com.google.Chrome", | |
"^com.apple.Terminal" | |
] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "right_arrow", | |
"modifiers": { | |
"mandatory": [ | |
"left_command", | |
"left_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": [ | |
"left_control", | |
"left_shift" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_unless", | |
"bundle_identifiers": [ | |
"^org\\.vim\\.", | |
"^com.googlecode.iterm2", | |
"^com.microsoft.VSCode", | |
"^com.google.Chrome", | |
"^com.apple.Terminal" | |
] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Ctrl + Left/Right (Chrome, Code)", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "delete_or_backspace", | |
"modifiers": { | |
"mandatory": [ | |
"left_command" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "delete_or_backspace", | |
"modifiers": [ | |
"left_option" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_if", | |
"bundle_identifiers": [ | |
"^com.microsoft.VSCode", | |
"^com.google.Chrome" | |
] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_arrow", | |
"modifiers": { | |
"mandatory": [ | |
"left_command" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow", | |
"modifiers": [ | |
"left_option" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_if", | |
"bundle_identifiers": [ | |
"^com.microsoft.VSCode", | |
"^com.google.Chrome" | |
] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "right_arrow", | |
"modifiers": { | |
"mandatory": [ | |
"left_command" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": [ | |
"left_option" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_if", | |
"bundle_identifiers": [ | |
"^com.microsoft.VSCode", | |
"^com.google.Chrome" | |
] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_arrow", | |
"modifiers": { | |
"mandatory": [ | |
"left_command", | |
"left_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow", | |
"modifiers": [ | |
"left_option", | |
"left_shift" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_if", | |
"bundle_identifiers": [ | |
"^com.microsoft.VSCode", | |
"^com.google.Chrome" | |
] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "right_arrow", | |
"modifiers": { | |
"mandatory": [ | |
"left_command", | |
"left_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": [ | |
"left_option", | |
"left_shift" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_if", | |
"bundle_identifiers": [ | |
"^com.microsoft.VSCode", | |
"^com.google.Chrome" | |
] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Fix Cmd+Tab", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "tab", | |
"modifiers": { | |
"mandatory": [ | |
"left_option" | |
], | |
"optional": [ | |
"left_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "tab", | |
"modifiers": [ | |
"left_command" | |
] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Fix Chrome Navigation", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_arrow", | |
"modifiers": { | |
"mandatory": [ | |
"left_option" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "8", | |
"modifiers": [ | |
"left_command", | |
"left_option" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_if", | |
"bundle_identifiers": [ | |
"^com.google.Chrome" | |
] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "right_arrow", | |
"modifiers": { | |
"mandatory": [ | |
"left_option" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "9", | |
"modifiers": [ | |
"left_command", | |
"left_option" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_if", | |
"bundle_identifiers": [ | |
"^com.google.Chrome" | |
] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Home / End (Terminal)", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "home" | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow", | |
"modifiers": [ | |
"left_shift", | |
"fn" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_if", | |
"bundle_identifiers": [ | |
"^com.apple.Terminal" | |
] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "end" | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": [ | |
"left_shift", | |
"fn" | |
] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_if", | |
"bundle_identifiers": [ | |
"^com.apple.Terminal" | |
] | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment