Skip to content

Instantly share code, notes, and snippets.

@rlucha
Last active June 5, 2019 08:21
Show Gist options
  • Save rlucha/dc773142d13f10733c78307b32f03eeb to your computer and use it in GitHub Desktop.
Save rlucha/dc773142d13f10733c78307b32f03eeb to your computer and use it in GitHub Desktop.
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": [
{
"description": "Map fn + number keys to their corresponding function keys (rev 1)",
"manipulators": [
{
"from": {
"key_code": "1",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f1",
"modifiers": [
"fn"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "2",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f2",
"modifiers": [
"fn"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "3",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f3",
"modifiers": [
"fn"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "4",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f4",
"modifiers": [
"fn"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "5",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f5",
"modifiers": [
"fn"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "6",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f6",
"modifiers": [
"fn"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "7",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f7",
"modifiers": [
"fn"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "8",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f8",
"modifiers": [
"fn"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "9",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f9",
"modifiers": [
"fn"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "0",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f10",
"modifiers": [
"fn"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "hyphen",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f11",
"modifiers": [
"fn"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "equal_sign",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f12",
"modifiers": [
"fn"
]
}
],
"type": "basic"
}
]
},
{
"description": "SemicolonPn: Semicolon enables SemicolonPn mode (see: https://geekhack.org/index.php?topic=51069.0)",
"manipulators": [
{
"from": {
"key_code": "semicolon",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "spacefn_mode",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "spacefn_mode",
"value": 0
}
}
],
"to_if_alone": [
{
"key_code": "semicolon"
}
],
"type": "basic"
}
]
},
{
"description": "SemicolonPn: Semicolon + [ijkl] to Up, Left, Down, Right",
"manipulators": [
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "i",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "l",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
}
]
},
{
"description": "CAPS LOCK mods",
"manipulators": [
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_or_backspace"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_or_backspace",
"modifiers": [
"fn"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "r",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "r",
"modifiers": [
"left_control"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "caps_lock pressed",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "caps_lock pressed",
"value": 0
}
}
],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 635,
"vendor_id": 1452
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": []
}
],
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": {
"key_code": "f1"
}
},
{
"from": {
"key_code": "f2"
},
"to": {
"consumer_key_code": "display_brightness_increment"
}
},
{
"from": {
"key_code": "f3"
},
"to": {
"key_code": "mission_control"
}
},
{
"from": {
"key_code": "f4"
},
"to": {
"key_code": "launchpad"
}
},
{
"from": {
"key_code": "f5"
},
"to": {
"key_code": "illumination_decrement"
}
},
{
"from": {
"key_code": "f6"
},
"to": {
"key_code": "illumination_increment"
}
},
{
"from": {
"key_code": "f7"
},
"to": {
"consumer_key_code": "rewind"
}
},
{
"from": {
"key_code": "f8"
},
"to": {
"consumer_key_code": "play_or_pause"
}
},
{
"from": {
"key_code": "f9"
},
"to": {
"consumer_key_code": "fastforward"
}
},
{
"from": {
"key_code": "f10"
},
"to": {
"consumer_key_code": "mute"
}
},
{
"from": {
"key_code": "f11"
},
"to": {
"consumer_key_code": "volume_decrement"
}
},
{
"from": {
"key_code": "f12"
},
"to": {
"consumer_key_code": "volume_increment"
}
}
],
"name": "Default profile",
"selected": true,
"simple_modifications": [
{
"from": {
"key_code": "down_arrow"
},
"to": {
"key_code": "vk_none"
}
},
{
"from": {
"key_code": "left_arrow"
},
"to": {
"key_code": "vk_none"
}
},
{
"from": {
"key_code": "non_us_backslash"
},
"to": {
"key_code": "escape"
}
},
{
"from": {
"key_code": "right_arrow"
},
"to": {
"key_code": "vk_none"
}
},
{
"from": {
"key_code": "up_arrow"
},
"to": {
"key_code": "vk_none"
}
}
],
"virtual_hid_keyboard": {
"country_code": 0
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment