Skip to content

Instantly share code, notes, and snippets.

@ponkotuy
Last active December 1, 2019 16:16
Show Gist options
  • Save ponkotuy/28398e96ac4d2c9a22c4bd41f86ecf35 to your computer and use it in GitHub Desktop.
Save ponkotuy/28398e96ac4d2c9a22c4bd41f86ecf35 to your computer and use it in GitHub Desktop.
Karabiner-ElementsでMacに人権を導入するcomplex_modifications
{
"title": "Browser settings",
"rules": [
{
"description": "left_control to left_command(Firefox&Chrome)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_control",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_command"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^org\\.mozilla\\.firefox",
"^com\\.google\\.Chrome"
]
}
]
}
]
},
{
"description": "left_command to left_control(Firefox&Chrome)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_command",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^org\\.mozilla\\.firefox",
"^com\\.google\\.Chrome"
]
}
]
}
]
},
{
"description": "revert ctrl+g(to cancel AquaSKK)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "g",
"modifiers": {
"mandatory": [
"left_command"
]
}
},
"to": [
{
"key_code": "escape"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^org\\.mozilla\\.firefox",
"^com\\.google\\.Chrome"
]
}
]
}
]
},
{
"description": "paste from shift+insert",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "insert",
"modifiers": {
"mandatory": [
"left_shift"
]
}
},
"to": [
{
"key_code": "v",
"modifiers": ["left_command"]
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^org\\.mozilla\\.firefox",
"^com\\.google\\.Chrome"
]
}
]
}
]
},
{
"description": "copy from ctrl+insert",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "insert",
"modifiers": {
"mandatory": [
"left_command"
]
}
},
"to": [
{
"key_code": "c",
"modifiers": ["left_command"]
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^org\\.mozilla\\.firefox",
"^com\\.google\\.Chrome"
]
}
]
}
]
},
{
"description": "change tab",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "tab",
"modifiers": {
"mandatory": [
"left_command"
]
}
},
"to": [
{
"key_code": "tab",
"modifiers": ["left_control"]
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^org\\.mozilla\\.firefox",
"^com\\.google\\.Chrome"
]
}
]
}
]
}
]
}
{
"title": "left_option to left_command",
"rules": [
{
"description": "left_option to left_command unless iTerm2",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_option",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_command"
}
],
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^com\\.googlecode\\.iterm2",
"^com\\.microsoft\\.VSCode"
]
}
]
}
]
}
]
}
{
"title": "Swap ¥ and \\ unless app is iTerm2",
"rules": [
{
"description": "Change ¥ to Alt+¥",
"manipulators": [
{
"from": {
"key_code": "international3"
},
"to": [
{
"key_code": "international3",
"modifiers": [
"option"
]
}
],
"type": "basic",
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^com\\.googlecode\\.iterm2"
]
}
]
}
]
},
{
"description": "Change Alt+¥ to ¥",
"manipulators": [
{
"from": {
"key_code": "international3",
"modifiers": {
"mandatory": [
"option"
]
}
},
"to": [
{
"key_code": "international3"
}
],
"type": "basic",
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^com\\.googlecode\\.iterm2"
]
}
]
}
]
}
]
}
{
"title": "ターミナル設定",
"rules": [
{
"description": "⌘T(新規タブ)の無効化",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "t",
"modifiers": {
"mandatory": [
"command"
],
"optional": [
"caps_lock"
]
}
},
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.googlecode\\.iterm2"
]
}
]
}
]
},
{
"description": "⌘D(ペインの分割)の無効化",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "d",
"modifiers": {
"mandatory": [
"command"
],
"optional": [
"caps_lock"
]
}
},
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.googlecode\\.iterm2"
]
}
]
}
]
},
{
"description": "⌘W(ウィンドウを閉じる)の無効化",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "w",
"modifiers": {
"mandatory": [
"command"
],
"optional": [
"caps_lock"
]
}
},
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.googlecode\\.iterm2"
]
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment