Skip to content

Instantly share code, notes, and snippets.

@ascarter
Created March 23, 2025 18:38
Show Gist options
  • Save ascarter/9ef39228087e71434c550178ac0deb3a to your computer and use it in GitHub Desktop.
Save ascarter/9ef39228087e71434c550178ac0deb3a to your computer and use it in GitHub Desktop.
HHKB Karabiner Profile
{
"title": "HHKB Layout",
"rules": [
{
"description": "HHKB Editing Keys",
"manipulators": [
{
"from": {
"key_code": "semicolon",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "left_arrow" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "quote",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "right_arrow" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "open_bracket",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "up_arrow" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "slash",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "down_arrow" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "l",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "page_up" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "period",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "page_down" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "k",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [
{
"key_code": "home",
"modifiers": []
}
],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "comma",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [
{
"key_code": "end",
"modifiers": []
}
],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "grave_accent_and_tilde",
"modifiers": {
"optional": ["any"]
}
},
"to": [{ "key_code": "escape" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "backslash",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "delete_forward" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "backslash",
"modifiers": {
"optional": ["any"]
}
},
"to": [{ "key_code": "delete_or_backspace" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "delete_or_backspace",
"modifiers": {
"optional": ["any"]
}
},
"to": [{ "key_code": "grave_accent_and_tilde" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "escape",
"modifiers": {
"optional": ["any"]
}
},
"to": [{ "key_code": "backslash" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
}
]
},
{
"description": "HHKB Function Keys",
"manipulators": [
{
"from": {
"key_code": "1",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f1" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "2",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f2" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "3",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f3" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "4",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f4" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "5",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f5" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "6",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f6" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "7",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f7" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "8",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f8" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "9",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f9" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "0",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f10" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "hyphen",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f11" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "equal_sign",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f12" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "i",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f13" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "o",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f14" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "p",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "f15" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
}
]
},
{
"description": "HHKB Media Keys",
"manipulators": [
{
"from": {
"key_code": "a",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "volume_decrement" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "s",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "volume_increment" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "d",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "key_code": "mute" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "f",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [{ "consumer_key_code": "eject" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
}
]
},
{
"description": "Disable arrow keys",
"manipulators": [
{
"from": {
"key_code": "left_arrow",
"modifiers": {
"optional": ["any"]
}
},
"to": [{ "key_code": "vk_none" }],
"conditions": [
{
"type": "device_unless",
"identifiers": [{ "vendor_id": 1278 }]
}
],
"type": "basic"
},
{
"from": {
"key_code": "right_arrow",
"modifiers": {
"optional": ["any"]
}
},
"to": [{ "key_code": "vk_none" }],
"type": "basic"
},
{
"from": {
"key_code": "up_arrow",
"modifiers": {
"optional": ["any"]
}
},
"to": [{ "key_code": "vk_none" }],
"type": "basic"
},
{
"from": {
"key_code": "down_arrow",
"modifiers": {
"optional": ["any"]
}
},
"to": [{ "key_code": "vk_none" }],
"type": "basic"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment