{ "title": "fn twice -> change input source / fn hold -> iterm", "author": "Ramiro Garcia (https://github.com/ranemirusG)", "rules": [ { "description": "fn + ` -> iTerm", "manipulators": [ { "type": "basic", "from": { "key_code": 53, "modifiers": { "mandatory": ["fn"] } }, "to": [{ "shell_command": "open '/Applications/iTerm.app'" }] } ] }, { "description": "Press twice fn to change input source & otherwise held_down and open iterm", "manipulators": [ { "conditions": [ { "type": "variable_if", "name": "fn pressed", "value": 1 } ], "type": "basic", "from": { "key_code": "fn", "modifiers": { "optional": [ "any" ] } }, "to": [ { "repeat": false, "key_code": "spacebar", "modifiers": ["left_control", "left_alt"], "lazy": true } ] }, { "type": "basic", "from": { "key_code": "fn", "modifiers": { "optional": [ "any" ] } }, "to": [ { "set_variable": { "name": "fn pressed", "value": 1 } } ], "to_if_held_down": [ { "key_code": "fn" } ], "parameters": { "basic.to_if_held_down_threshold_milliseconds": 0 }, "to_delayed_action": { "to_if_invoked": [ { "set_variable": { "name": "fn pressed", "value": 0 } } ], "to_if_canceled": [ { "set_variable": { "name": "fn pressed", "value": 0 } } ] } } ] } ] }