Last active
August 10, 2018 03:27
-
-
Save MillerGregor/831c7a6f3d1936c4ebd42dcdf3d7c935 to your computer and use it in GitHub Desktop.
Karabiner
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": "SpaceFN", | |
"rules": [ | |
{ | |
"description": "SpaceFN: Space enables SpaceFN mode (see: https://geekhack.org/index.php?topic=51069.0)", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "spacebar", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "spacebar" | |
} | |
], | |
"to_after_key_up": [ | |
{ | |
"set_variable": { | |
"name": "spacefn_mode", | |
"value": 0 | |
} | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "SpaceFN: Space+b to Space (hold to repeat)", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "b", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "spacebar" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "SpaceFN: Space+[ijkl] to Up, Left, Down, Right", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "i", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "up_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "k", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "down_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "j", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "l", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "SpaceFN: Space+[hjkl] to Left, Down, Up, Right", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "h", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "j", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "down_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "k", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "up_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "l", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "SpaceFN: Space+h to Home, Space+; to End", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"name": "spacefn_mode", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "h" | |
}, | |
"to": [ | |
{ | |
"key_code": "home" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "spacefn_mode", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "semicolon" | |
}, | |
"to": [ | |
{ | |
"key_code": "end" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "SpaceFN: Space+Command to Space+Option", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"name": "spacefn_mode", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_option" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "SpaceFN: Space+u to page_up, Space+ m to page_down", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"name": "spacefn_mode", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "u" | |
}, | |
"to": [ | |
{ | |
"key_code": "page_up" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "spacefn_mode", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "m" | |
}, | |
"to": [ | |
{ | |
"key_code": "page_down" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "SpaceFN: Space+backspace to delete", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"name": "spacefn_mode", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "delete_or_backspace" | |
}, | |
"to": [ | |
{ | |
"key_code": "delete" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "SpaceFN: Space+u to Home, Space+o to End", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "u", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "home" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "o", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "end" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "SpaceFN: Space+h to Page Up, Space+n to Page Down", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "h", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "page_up" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "n", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "page_down" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "SpaceFN: Space+p to Print Screen, Space+Open Bracket ([) to Scroll Lock, Space+Close Bracket (]) to Pause, Space+Backspace to Forward Delete, Space+Backslash (\\) to Insert", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "p", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "print_screen" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "open_bracket", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "scroll_lock" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "close_bracket", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "pause" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "backslash", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "insert" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "delete_or_backspace", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "delete_forward" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "SpaceFN: Backquote (`) to Escape, Space+[1-9] to F[1-9], Space+0 to F10, Space+Hyphen (-) to F11, Space+Equal Sign (=) to F12, Space+e to Escape, Space+m to Backtick (`), Space+Comma to Tilde (~), Space+Slash (/) to Menu", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "grave_accent_and_tilde", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "escape" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 0 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "e", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "escape" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "grave_accent_and_tilde", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "grave_accent_and_tilde" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "1", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f1" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "2", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f2" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "3", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f3" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "4", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f4" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "5", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f5" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "6", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f6" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "7", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f7" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "8", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f8" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "9", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f9" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "0", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f10" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "hyphen", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f11" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "equal_sign", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f12" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "slash", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "menu" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "spacefn_mode", | |
"value": 1 | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment