Skip to content

Instantly share code, notes, and snippets.

@JohnAtl
Created December 27, 2021 15:25
Show Gist options
  • Save JohnAtl/dda2f8f682c21dc38bd772052a2ee8dc to your computer and use it in GitHub Desktop.
Save JohnAtl/dda2f8f682c21dc38bd772052a2ee8dc to your computer and use it in GitHub Desktop.
My Karabiner-Elements config file. CapsLock when held is Hyper, when tapped sends F19. LeftShift when held is shift, when tapped sends F20
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": false,
"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": "Change caps_lock key to command+control+option+shift. (Post f19 key when pressed alone)",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_shift",
"modifiers": [
"left_command",
"left_control",
"left_option"
]
}
],
"to_if_alone": [
{
"key_code": "f19"
}
],
"type": "basic"
}
]
},
{
"description": "Left-shift, when held, acts as normal, and posts f20 key when pressed alone (tapped)",
"manipulators": [
{
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_shift"
}
],
"to_if_alone": [
{
"key_code": "f20"
}
],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 50475,
"vendor_id": 1133
},
"ignore": false,
"manipulate_caps_lock_led": false,
"simple_modifications": []
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 50475,
"vendor_id": 1133
},
"ignore": true,
"manipulate_caps_lock_led": false,
"simple_modifications": []
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 258,
"vendor_id": 10730
},
"ignore": false,
"manipulate_caps_lock_led": false,
"simple_modifications": []
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 258,
"vendor_id": 10730
},
"ignore": true,
"manipulate_caps_lock_led": false,
"simple_modifications": []
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 597,
"vendor_id": 1452
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [
{
"from": {
"key_code": "spacebar"
},
"to": {
"key_code": "f18"
}
}
]
}
],
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": {
"key_code": "vk_consumer_brightness_down"
}
},
{
"from": {
"key_code": "f2"
},
"to": {
"key_code": "vk_consumer_brightness_up"
}
},
{
"from": {
"key_code": "f3"
},
"to": {
"key_code": "vk_mission_control"
}
},
{
"from": {
"key_code": "f4"
},
"to": {
"key_code": "vk_launchpad"
}
},
{
"from": {
"key_code": "f5"
},
"to": {
"key_code": "vk_consumer_illumination_down"
}
},
{
"from": {
"key_code": "f6"
},
"to": {
"key_code": "vk_consumer_illumination_up"
}
},
{
"from": {
"key_code": "f7"
},
"to": {
"key_code": "vk_consumer_previous"
}
},
{
"from": {
"key_code": "f8"
},
"to": {
"key_code": "vk_consumer_play"
}
},
{
"from": {
"key_code": "f9"
},
"to": {
"key_code": "vk_consumer_next"
}
},
{
"from": {
"key_code": "f10"
},
"to": {
"key_code": "mute"
}
},
{
"from": {
"key_code": "f11"
},
"to": {
"key_code": "volume_down"
}
},
{
"from": {
"key_code": "f12"
},
"to": {
"key_code": "volume_up"
}
}
],
"name": "Default profile",
"parameters": {
"delay_milliseconds_before_open_device": 1000
},
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"caps_lock_delay_milliseconds": 0,
"country_code": 0,
"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