Created
February 25, 2021 12:36
-
-
Save mutoe/86c97bf652a2836a7c6604d79bf22d23 to your computer and use it in GitHub Desktop.
Karabiner modifier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "HHKB modifiers for mutoe (Tab key)", | |
"rules": [ | |
{ | |
"description": "Change left_shift to caps_lock if pressed alone.", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_shift", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to_if_alone": [ | |
{ | |
"key_code": "caps_lock" | |
} | |
], | |
"to": [ | |
{ | |
"key_code": "left_shift" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Tab + hjkl to arrow keys", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "j", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "down_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "k", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "up_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "h", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "l", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "tab", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"parameters": { | |
"basic.to_if_alone_timeout_milliseconds": 250, | |
"basic.to_if_held_down_threshold_milliseconds": 250 | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "tab pressed", | |
"value": 1 | |
} | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "tab" | |
} | |
], | |
"to_after_key_up": [ | |
{ | |
"set_variable": { | |
"name": "tab pressed", | |
"value": 0 | |
} | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Tab + uiyo to shift + arrow keys", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "u", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "down_arrow", | |
"modifiers": ["left_shift"] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "i", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "up_arrow", | |
"modifiers": ["left_shift"] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "y", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow", | |
"modifiers": ["left_shift"] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "o", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": ["left_shift"] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "tab", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"parameters": { | |
"basic.to_if_alone_timeout_milliseconds": 250, | |
"basic.to_if_held_down_threshold_milliseconds": 250 | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "tab pressed", | |
"value": 1 | |
} | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "tab" | |
} | |
], | |
"to_after_nkey_up": [ | |
{ | |
"set_variable": { | |
"name": "tab pressed", | |
"value": 0 | |
} | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Tab + nm,. to home/pgup/pgdown/end", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "n", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "home" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "m", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "page_down" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "comma", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "page_up" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "period", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "end" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "tab", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"parameters": { | |
"basic.to_if_alone_timeout_milliseconds": 250, | |
"basic.to_if_held_down_threshold_milliseconds": 250 | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "tab pressed", | |
"value": 1 | |
} | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "tab" | |
} | |
], | |
"to_after_key_up": [ | |
{ | |
"set_variable": { | |
"name": "tab pressed", | |
"value": 0 | |
} | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Tab + 1234567890-= to F1-F12", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "1", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f1" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "2", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f2" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "3", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f3" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "4", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f4" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "5", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f5" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "6", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f6" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "7", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f7" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "8", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f8" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "9", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f9" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "0", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f10" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "hyphen", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f11" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "equal_sign", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f12" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Tab + backspace to delete", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "delete_or_backspace", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "delete_forward" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "tab pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "tab", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"parameters": { | |
"basic.to_if_alone_timeout_milliseconds": 250, | |
"basic.to_if_held_down_threshold_milliseconds": 250 | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "tab pressed", | |
"value": 1 | |
} | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "tab" | |
} | |
], | |
"to_after_key_up": [ | |
{ | |
"set_variable": { | |
"name": "tab pressed", | |
"value": 0 | |
} | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment