Skip to content

Instantly share code, notes, and snippets.

@AkashiSN
Last active April 22, 2019 06:57
Show Gist options
  • Save AkashiSN/43db7157cce20e9dff48acfff8e5524f to your computer and use it in GitHub Desktop.
Save AkashiSN/43db7157cce20e9dff48acfff8e5524f to your computer and use it in GitHub Desktop.
setting for Karabiner
{
"title": "caps_lock",
"rules": [
{
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.apple\\.Terminal$",
"^com\\.googlecode\\.iterm2$"
],
"type": "frontmost_application_unless"
}
],
"description": "Change caps_lock to command if alone is escape. (without Terminal,iterm2) Apple internal keyborad",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_command"
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
},
{
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.apple\\.Terminal$",
"^com\\.googlecode\\.iterm2$"
],
"type": "frontmost_application_if"
}
],
"description": "Change caps_lock to ctrl if alone is escape. (when Terminal,iterm2) Apple internal keyborad",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
},
{
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.apple\\.Terminal$",
"^com\\.googlecode\\.iterm2$"
],
"type": "frontmost_application_unless"
}
],
"description": "Change left_control to command if alone is escape. (without Terminal,iterm2) HHKBB",
"from": {
"key_code": "left_control",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_command"
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
},
{
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.apple\\.Terminal$",
"^com\\.googlecode\\.iterm2$"
],
"type": "frontmost_application_unless"
}
],
"description": "Change left_command to left_control. (without terminal,iterm2) HHKBB",
"from": {
"key_code": "left_command",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"type": "basic"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment