Skip to content

Instantly share code, notes, and snippets.

@avli
Last active August 23, 2022 21:57
Show Gist options
  • Save avli/6cc0778e513f30318c13dbbcd39df305 to your computer and use it in GitHub Desktop.
Save avli/6cc0778e513f30318c13dbbcd39df305 to your computer and use it in GitHub Desktop.
{
"global": {
"check_for_updates_on_startup": false,
"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 media control keys (rev 2)",
"manipulators": [
{
"from": {
"key_code": "1",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f1"
}
],
"type": "basic"
},
{
"from": {
"key_code": "2",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f2"
}
],
"type": "basic"
},
{
"from": {
"key_code": "3",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f3"
}
],
"type": "basic"
},
{
"from": {
"key_code": "4",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f4"
}
],
"type": "basic"
},
{
"from": {
"key_code": "5",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f5"
}
],
"type": "basic"
},
{
"from": {
"key_code": "6",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f6"
}
],
"type": "basic"
},
{
"from": {
"key_code": "7",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f7"
}
],
"type": "basic"
},
{
"from": {
"key_code": "8",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f8"
}
],
"type": "basic"
},
{
"from": {
"key_code": "9",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f9"
}
],
"type": "basic"
},
{
"from": {
"key_code": "0",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f10"
}
],
"type": "basic"
},
{
"from": {
"key_code": "hyphen",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f11"
}
],
"type": "basic"
},
{
"from": {
"key_code": "equal_sign",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f12"
}
],
"type": "basic"
}
]
},
{
"description": "Fn + hjkl to arrow keys Vim",
"manipulators": [
{
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
}
]
},
{
"description": "Map ctrl + [ to escape",
"manipulators": [
{
"from": {
"key_code": "open_bracket",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
},
{
"description": "Map cmd + ` to escape",
"manipulators": [
{
"from": {
"key_code": "grave_accent_and_tilde",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 1024,
"vendor_id": 1266
},
"ignore": false,
"manipulate_caps_lock_led": false,
"simple_modifications": [
{
"from": {
"key_code": "insert"
},
"to": [
{
"apple_vendor_top_case_key_code": "keyboard_fn"
}
]
},
{
"from": {
"key_code": "left_command"
},
"to": [
{
"key_code": "left_option"
}
]
},
{
"from": {
"key_code": "left_option"
},
"to": [
{
"key_code": "left_command"
}
]
},
{
"from": {
"key_code": "right_command"
},
"to": [
{
"key_code": "right_option"
}
]
},
{
"from": {
"key_code": "right_option"
},
"to": [
{
"key_code": "right_command"
}
]
}
]
}
],
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": [
{
"consumer_key_code": "display_brightness_decrement"
}
]
},
{
"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",
"parameters": {
"delay_milliseconds_before_open_device": 1000
},
"selected": true,
"simple_modifications": [
{
"from": {
"key_code": "caps_lock"
},
"to": [
{
"key_code": "fn"
}
]
},
{
"from": {
"key_code": "non_us_backslash"
},
"to": [
{
"key_code": "grave_accent_and_tilde"
}
]
}
],
"virtual_hid_keyboard": {
"country_code": 0,
"indicate_sticky_modifier_keys_state": true,
"mouse_key_xy_scale": 100
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment