Last active
May 20, 2025 21: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": { "show_in_menu_bar": false }, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"rules": [ | |
{ | |
"description": "Fix home and end in Slack and Messages.", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^com.tinyspeck.slackmacgap$", | |
"^com.apple.MobileSMS$" | |
], | |
"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$", | |
"^com.apple.MobileSMS$" | |
], | |
"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": [ | |
{ | |
"identifiers": { | |
"is_keyboard": true, | |
"product_id": 640, | |
"vendor_id": 1452 | |
}, | |
"simple_modifications": [ | |
{ | |
"from": { "key_code": "right_command" }, | |
"to": [{ "key_code": "right_option" }] | |
}, | |
{ | |
"from": { "key_code": "right_option" }, | |
"to": [{ "key_code": "right_command" }] | |
} | |
] | |
}, | |
{ | |
"identifiers": { | |
"is_pointing_device": true, | |
"product_id": 254, | |
"vendor_id": 1390 | |
}, | |
"ignore": false, | |
"simple_modifications": [ | |
{ | |
"from": { "pointing_button": "button4" }, | |
"to": [{ "pointing_button": "button3" }] | |
}, | |
{ | |
"from": { "pointing_button": "button5" }, | |
"to": [{ "pointing_button": "button4" }] | |
} | |
] | |
}, | |
{ | |
"identifiers": { | |
"is_pointing_device": true, | |
"product_id": 268, | |
"vendor_id": 1390 | |
}, | |
"simple_modifications": [ | |
{ | |
"from": { "pointing_button": "button4" }, | |
"to": [{ "pointing_button": "button2" }] | |
}, | |
{ | |
"from": { "pointing_button": "button5" }, | |
"to": [{ "pointing_button": "button4" }] | |
} | |
] | |
}, | |
{ | |
"identifiers": { | |
"is_keyboard": true, | |
"is_pointing_device": true, | |
"product_id": 61453, | |
"vendor_id": 65261 | |
}, | |
"manipulate_caps_lock_led": false | |
}, | |
{ | |
"identifiers": { | |
"is_keyboard": true, | |
"product_id": 48879, | |
"vendor_id": 65261 | |
}, | |
"ignore": true, | |
"manipulate_caps_lock_led": false | |
}, | |
{ | |
"identifiers": { "is_keyboard": true }, | |
"simple_modifications": [ | |
{ | |
"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": [{ "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", | |
"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, | |
"keyboard_type": "ansi", | |
"keyboard_type_v2": "ansi" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment