Skip to content

Instantly share code, notes, and snippets.

@komamitsu
Last active Feb 27, 2019
Embed
What would you like to do?
Karabiner-Elements Config
{
"title": "Komamitsu's configuration",
"rules": [
{
"description": "Internal US keyboard (1452/632): Post option if left_control is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 632
}
]
}
],
"from": {
"key_code": "left_control",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_option"
}
]
}
]
},
{
"description": "Internal US keyboard (1452/632): Post control if left_command is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 632
}
]
}
],
"from": {
"key_code": "left_command",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_control"
}
]
}
]
},
{
"description": "Internal US keyboard (1452/632): Post command if left_option is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 632
}
]
}
],
"from": {
"key_code": "left_option",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_command"
}
]
}
]
},
{
"description": "Internal US keyboard (1452/632): Post escape if right_command is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 632
}
]
}
],
"from": {
"key_code": "right_command",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "escape"
}
]
}
]
},
{
"description": "Internal US keyboard (1452/632): Toggle kana if right_option is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "ja"
}
]
},
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 632
}
]
}
],
"from": {
"key_code": "right_option",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "japanese_eisuu"
}
]
},
{
"type": "basic",
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "en"
}
]
},
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 632
}
]
}
],
"from": {
"key_code": "right_option",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "japanese_kana"
}
]
}
]
},
{
"description": "Internal US keyboard (1452/627): Post option if left_control is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 627
}
]
}
],
"from": {
"key_code": "left_control",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_option"
}
]
}
]
},
{
"description": "Internal US keyboard (1452/627): Post control if left_command is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 627
}
]
}
],
"from": {
"key_code": "left_command",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_control"
}
]
}
]
},
{
"description": "Internal US keyboard (1452/627): Post command if left_option is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 627
}
]
}
],
"from": {
"key_code": "left_option",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_command"
}
]
}
]
},
{
"description": "Internal US keyboard (1452/627): Post escape if right_command is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 627
}
]
}
],
"from": {
"key_code": "right_command",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "escape"
}
]
}
]
},
{
"description": "Internal US keyboard (1452/627): Toggle kana if right_option is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "ja"
}
]
},
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 627
}
]
}
],
"from": {
"key_code": "right_option",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "japanese_eisuu"
}
]
},
{
"type": "basic",
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "en"
}
]
},
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 627
}
]
}
],
"from": {
"key_code": "right_option",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "japanese_kana"
}
]
}
]
},
{
"description": "Internal JP keyboard (1452/612): Post control if japanese_eisuu is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 612
}
]
}
],
"from": {
"key_code": "japanese_eisuu",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_control"
}
]
}
]
},
{
"description": "Internal JP keyboard (1452/612): Post escape if japanese_kana is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 612
}
]
}
],
"from": {
"key_code": "japanese_kana",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "escape"
}
]
}
]
},
{
"description": "Internal JP keyboard (1452/612): Toggle kana if right_command is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "ja"
}
]
},
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 612
}
]
}
],
"from": {
"key_code": "right_command",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "japanese_eisuu"
}
]
},
{
"type": "basic",
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "en"
}
]
},
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 612
}
]
}
],
"from": {
"key_code": "right_command",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "japanese_kana"
}
]
}
]
},
{
"description": "External keyboard (10874/16643): Post option if left_control is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 10874,
"product_id": 16643
}
]
}
],
"from": {
"key_code": "left_control",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_option"
}
]
}
]
},
{
"description": "External keyboard (10874/16643): Post control if left_alt is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 10874,
"product_id": 16643
}
]
}
],
"from": {
"key_code": "left_alt",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_control"
}
]
}
]
},
{
"description": "External keyboard (10874/16643): Post escape if right_alt is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 10874,
"product_id": 16643
}
]
}
],
"from": {
"key_code": "right_alt",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "escape"
}
]
}
]
},
{
"description": "External keyboard (10874/16643): Toggle kana if right_control is pressed.",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "ja"
}
]
},
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 10874,
"product_id": 16643
}
]
}
],
"from": {
"key_code": "right_control",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "japanese_eisuu"
}
]
},
{
"type": "basic",
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "en"
}
]
},
{
"type": "device_if",
"identifiers": [
{
"vendor_id": 10874,
"product_id": 16643
}
]
}
],
"from": {
"key_code": "right_control",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "japanese_kana"
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment