Skip to content

Instantly share code, notes, and snippets.

@matori
Last active February 7, 2018 06:57
Show Gist options
  • Save matori/b88aae67a56867dff5f80fd827e57b88 to your computer and use it in GitHub Desktop.
Save matori/b88aae67a56867dff5f80fd827e57b88 to your computer and use it in GitHub Desktop.
Karabiner-Elements のカスタムルール
{
"title": "カスタムルール",
"rules": [
{
"description": "右Cmd空打ちでIME切り替え",
"manipulators": [
{
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "ja"
}
]
}
],
"type": "basic",
"from": {
"key_code": "right_command",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_command"
}
],
"to_if_alone": [
{
"key_code": "japanese_eisuu"
}
]
},
{
"conditions": [
{
"type": "input_source_unless",
"input_sources": [
{
"language": "ja"
}
]
}
],
"type": "basic",
"from": {
"key_code": "right_command",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_command"
}
],
"to_if_alone": [
{
"key_code": "japanese_kana"
}
]
}
]
},
{
"description": "コロンとセミコロンを入れ替え",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "semicolon",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "semicolon",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "semicolon",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "semicolon"
}
]
}
]
},
{
"description": "fn+letterをcommand+letterに変更",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "a",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "a",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "b",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "b",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "c",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "c",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "d",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "d",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "e",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "e",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "f",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "g",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "g",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "h",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "i",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "i",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "j",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "k",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "l",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "m",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "m",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "n",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "n",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "o",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "o",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "p",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "p",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "q",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "q",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "r",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "r",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "s",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "s",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "t",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "t",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "u",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "u",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "v",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "v",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "w",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "w",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "x",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "x",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "y",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "y",
"modifiers": [
"left_command"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "z",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "z",
"modifiers": [
"left_command"
]
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment