Last active
January 5, 2024 23:03
-
-
Save greneholt/730bb673f37d5f79b7ae727c09ab38a4 to your computer and use it in GitHub Desktop.
Keyboard remapping with semicolon arrowkeys
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
{ | |
"global": { | |
"ask_for_confirmation_before_quitting": true, | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": false, | |
"show_profile_name_in_menu_bar": false, | |
"unsafe_ui": 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": "Fix home and end in Slack.", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^com.tinyspeck.slackmacgap$" | |
], | |
"type": "frontmost_application_if" | |
} | |
], | |
"from": { | |
"key_code": "home", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow", | |
"modifiers": [ | |
"left_command" | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^com.tinyspeck.slackmacgap$" | |
], | |
"type": "frontmost_application_if" | |
} | |
], | |
"from": { | |
"key_code": "end", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": [ | |
"left_command" | |
] | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Change caps_lock to command if pressed with other keys, to escape if pressed alone.", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^net\\.kovidgoyal\\.kitty$", | |
"^com\\.apple\\.Terminal$", | |
"^com\\.googlecode\\.iterm2$", | |
"^com\\.github\\.wez\\.wezterm$", | |
"^com\\.turbovnc\\.vncviewer\\.VncViewer$" | |
], | |
"type": "frontmost_application_unless" | |
} | |
], | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_command" | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "escape" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Change caps_lock to control if pressed with other keys in terminal, to escape if pressed alone.", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^net\\.kovidgoyal\\.kitty$", | |
"^com\\.apple\\.Terminal$", | |
"^com\\.googlecode\\.iterm2$", | |
"^com\\.github\\.wez\\.wezterm$", | |
"^com\\.turbovnc\\.vncviewer\\.VncViewer$" | |
], | |
"type": "frontmost_application_if" | |
} | |
], | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_control" | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "escape" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Change left option to shift+ctrl+cmd+option (aka hyper).", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "left_option", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_option", | |
"modifiers": [ | |
"left_shift", | |
"left_control", | |
"left_command" | |
] | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Semicolon + L = Right", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "l", | |
"modifiers": { | |
"mandatory": [ | |
"fn" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Semicolon + K = Down", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "k", | |
"modifiers": { | |
"mandatory": [ | |
"fn" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "down_arrow" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Semicolon + J = Left", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "j", | |
"modifiers": { | |
"mandatory": [ | |
"fn" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Semicolon + I = Up", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "i", | |
"modifiers": { | |
"mandatory": [ | |
"fn" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "up_arrow" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Semicolon + H = Page up", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "h", | |
"modifiers": { | |
"mandatory": [ | |
"fn" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "page_up" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Semicolon + N = Page down", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "n", | |
"modifiers": { | |
"mandatory": [ | |
"fn" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "page_down" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Semicolon + Y = Backspace", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "y", | |
"modifiers": { | |
"mandatory": [ | |
"fn" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "delete_or_backspace" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Semicolon + Space = Delete", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "spacebar", | |
"modifiers": { | |
"mandatory": [ | |
"fn" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "delete_or_backspace", | |
"modifiers": [ | |
"fn" | |
] | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Semicolon + U = Home", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^com.tinyspeck.slackmacgap$" | |
], | |
"type": "frontmost_application_if" | |
} | |
], | |
"from": { | |
"key_code": "u", | |
"modifiers": { | |
"mandatory": [ | |
"fn" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow", | |
"modifiers": [ | |
"left_command" | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^com.tinyspeck.slackmacgap$" | |
], | |
"type": "frontmost_application_unless" | |
} | |
], | |
"from": { | |
"key_code": "u", | |
"modifiers": { | |
"mandatory": [ | |
"fn" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "home" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Semicolon + O = End", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^com.tinyspeck.slackmacgap$" | |
], | |
"type": "frontmost_application_if" | |
} | |
], | |
"from": { | |
"key_code": "o", | |
"modifiers": { | |
"mandatory": [ | |
"fn" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": [ | |
"left_command" | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^com.tinyspeck.slackmacgap$" | |
], | |
"type": "frontmost_application_unless" | |
} | |
], | |
"from": { | |
"key_code": "o", | |
"modifiers": { | |
"mandatory": [ | |
"fn" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "end" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Semicolon as fn", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "semicolon", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "fn" | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "semicolon" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
} | |
] | |
}, | |
"devices": [ | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": false, | |
"is_pointing_device": true, | |
"product_id": 50184, | |
"vendor_id": 1133 | |
}, | |
"ignore": true, | |
"manipulate_caps_lock_led": false, | |
"simple_modifications": [], | |
"treat_as_built_in_keyboard": false | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": false, | |
"is_pointing_device": true, | |
"product_id": 2378, | |
"vendor_id": 1008 | |
}, | |
"ignore": true, | |
"manipulate_caps_lock_led": false, | |
"simple_modifications": [], | |
"treat_as_built_in_keyboard": false | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": true, | |
"is_pointing_device": false, | |
"product_id": 640, | |
"vendor_id": 1452 | |
}, | |
"ignore": false, | |
"manipulate_caps_lock_led": true, | |
"simple_modifications": [ | |
{ | |
"from": { | |
"key_code": "right_command" | |
}, | |
"to": [ | |
{ | |
"key_code": "right_option" | |
} | |
] | |
}, | |
{ | |
"from": { | |
"key_code": "right_option" | |
}, | |
"to": [ | |
{ | |
"key_code": "right_command" | |
} | |
] | |
} | |
], | |
"treat_as_built_in_keyboard": false | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": false, | |
"is_pointing_device": true, | |
"product_id": 640, | |
"vendor_id": 1452 | |
}, | |
"ignore": true, | |
"manipulate_caps_lock_led": false, | |
"simple_modifications": [], | |
"treat_as_built_in_keyboard": false | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": true, | |
"is_pointing_device": false, | |
"product_id": 24866, | |
"vendor_id": 7504 | |
}, | |
"ignore": false, | |
"manipulate_caps_lock_led": true, | |
"simple_modifications": [], | |
"treat_as_built_in_keyboard": false | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": false, | |
"is_pointing_device": true, | |
"product_id": 24866, | |
"vendor_id": 7504 | |
}, | |
"ignore": true, | |
"manipulate_caps_lock_led": false, | |
"simple_modifications": [], | |
"treat_as_built_in_keyboard": false | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": false, | |
"is_pointing_device": true, | |
"product_id": 254, | |
"vendor_id": 1390 | |
}, | |
"ignore": false, | |
"manipulate_caps_lock_led": false, | |
"simple_modifications": [ | |
{ | |
"from": { | |
"pointing_button": "button4" | |
}, | |
"to": [ | |
{ | |
"pointing_button": "button3" | |
} | |
] | |
}, | |
{ | |
"from": { | |
"pointing_button": "button5" | |
}, | |
"to": [ | |
{ | |
"pointing_button": "button4" | |
} | |
] | |
} | |
], | |
"treat_as_built_in_keyboard": false | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": false, | |
"is_pointing_device": true, | |
"product_id": 268, | |
"vendor_id": 1390 | |
}, | |
"ignore": true, | |
"manipulate_caps_lock_led": false, | |
"simple_modifications": [ | |
{ | |
"from": { | |
"pointing_button": "button4" | |
}, | |
"to": [ | |
{ | |
"pointing_button": "button2" | |
} | |
] | |
}, | |
{ | |
"from": { | |
"pointing_button": "button5" | |
}, | |
"to": [ | |
{ | |
"pointing_button": "button4" | |
} | |
] | |
} | |
], | |
"treat_as_built_in_keyboard": false | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": true, | |
"is_pointing_device": true, | |
"product_id": 61453, | |
"vendor_id": 65261 | |
}, | |
"ignore": true, | |
"manipulate_caps_lock_led": false, | |
"simple_modifications": [], | |
"treat_as_built_in_keyboard": false | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": true, | |
"is_pointing_device": false, | |
"product_id": 48879, | |
"vendor_id": 65261 | |
}, | |
"ignore": true, | |
"manipulate_caps_lock_led": false, | |
"simple_modifications": [], | |
"treat_as_built_in_keyboard": false | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": false, | |
"is_pointing_device": true, | |
"product_id": 48879, | |
"vendor_id": 65261 | |
}, | |
"ignore": true, | |
"manipulate_caps_lock_led": false, | |
"simple_modifications": [], | |
"treat_as_built_in_keyboard": false | |
} | |
], | |
"fn_function_keys": [ | |
{ | |
"from": { | |
"key_code": "f1" | |
}, | |
"to": [ | |
{ | |
"key_code": "display_brightness_decrement" | |
} | |
] | |
}, | |
{ | |
"from": { | |
"key_code": "f2" | |
}, | |
"to": [ | |
{ | |
"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": [ | |
{ | |
"key_code": "rewind" | |
} | |
] | |
}, | |
{ | |
"from": { | |
"key_code": "f8" | |
}, | |
"to": [ | |
{ | |
"key_code": "play_or_pause" | |
} | |
] | |
}, | |
{ | |
"from": { | |
"key_code": "f9" | |
}, | |
"to": [ | |
{ | |
"key_code": "fastforward" | |
} | |
] | |
}, | |
{ | |
"from": { | |
"key_code": "f10" | |
}, | |
"to": [ | |
{ | |
"key_code": "mute" | |
} | |
] | |
}, | |
{ | |
"from": { | |
"key_code": "f11" | |
}, | |
"to": [ | |
{ | |
"key_code": "volume_decrement" | |
} | |
] | |
}, | |
{ | |
"from": { | |
"key_code": "f12" | |
}, | |
"to": [ | |
{ | |
"key_code": "volume_increment" | |
} | |
] | |
} | |
], | |
"name": "Default profile", | |
"parameters": { | |
"delay_milliseconds_before_open_device": 1000 | |
}, | |
"selected": true, | |
"simple_modifications": [ | |
{ | |
"from": { | |
"apple_vendor_top_case_key_code": "keyboard_fn" | |
}, | |
"to": [ | |
{ | |
"key_code": "delete_forward" | |
} | |
] | |
} | |
], | |
"virtual_hid_keyboard": { | |
"caps_lock_delay_milliseconds": 0, | |
"country_code": 0, | |
"indicate_sticky_modifier_keys_state": true, | |
"keyboard_type": "ansi", | |
"mouse_key_xy_scale": 100 | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment