Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ufo22940268/0becc84f27bf1502f0c962c1503770f8 to your computer and use it in GitHub Desktop.

Select an option

Save ufo22940268/0becc84f27bf1502f0c962c1503770f8 to your computer and use it in GitHub Desktop.
{
"title": "ALT <=> CMD in External keyboard",
"rules": [
{
"description": "Swap option and command in External keyboard",
"manipulators": [
{
"conditions": [
{
"type": "device_unless",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 632
}
]
}
],
"type": "basic",
"from": {
"key_code": "left_option",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_command"
}
]
},
{
"conditions": [
{
"type": "device_unless",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 632
}
]
}
],
"type": "basic",
"from": {
"key_code": "left_command",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_option"
}
]
},
{
"conditions": [
{
"type": "device_unless",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 632
}
]
}
],
"type": "basic",
"from": {
"key_code": "right_option",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_command"
}
]
},
{
"conditions": [
{
"type": "device_unless",
"identifiers": [
{
"vendor_id": 1452,
"product_id": 632
}
]
}
],
"type": "basic",
"from": {
"key_code": "right_command",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_option"
}
]
}
]
}
]
}
@lukewang1024
Copy link

Better remove product_id from the conditions to target Apple keyboards generically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment