Skip to content

Instantly share code, notes, and snippets.

@maehler
Created April 9, 2019 15:06
Show Gist options
  • Save maehler/2655c9c1602eb1ab654f45f3a1905448 to your computer and use it in GitHub Desktop.
Save maehler/2655c9c1602eb1ab654f45f3a1905448 to your computer and use it in GitHub Desktop.
Karabiner Mac configuration
{
"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
},
"rules":[
{
"description":"Escape hyper",
"manipulators":[
{
"type":"basic",
"from":{
"key_code":"escape"
},
"to":[
{
"set_variable":{
"name":"caps_hyper",
"value":1
}
}
],
"to_after_key_up":[
{
"set_variable":{
"name":"caps_hyper",
"value":0
}
}
],
"to_if_alone":[
{
"key_code":"escape"
}
]
}
]
},
{
"description":"Escape hyper -> arrow keys",
"manipulators":[
{
"type":"basic",
"from":{
"key_code":"e"
},
"to":[
{
"key_code":"up_arrow"
}
],
"conditions":[
{
"name":"caps_hyper",
"type":"variable_if",
"value":1
}
]
},
{
"type":"basic",
"from":{
"key_code":"s"
},
"to":[
{
"key_code":"left_arrow"
}
],
"conditions":[
{
"name":"caps_hyper",
"type":"variable_if",
"value":1
}
]
},
{
"type":"basic",
"from":{
"key_code":"d"
},
"to":[
{
"key_code":"down_arrow"
}
],
"conditions":[
{
"name":"caps_hyper",
"type":"variable_if",
"value":1
}
]
},
{
"type":"basic",
"from":{
"key_code":"f"
},
"to":[
{
"key_code":"right_arrow"
}
],
"conditions":[
{
"name":"caps_hyper",
"type":"variable_if",
"value":1
}
]
}
]
},
{
"description":"Escape hyper -> Swedish characters",
"manipulators":[
{
"type":"basic",
"from":{
"key_code":"open_bracket"
},
"to":[
{
"key_code":"a",
"modifiers":[
"left_option"
]
}
],
"conditions":[
{
"name":"caps_hyper",
"type":"variable_if",
"value":1
}
]
},
{
"type":"basic",
"from":{
"key_code":"semicolon"
},
"to":[
{
"key_code":"u",
"modifiers":[
"left_option"
]
},
{
"key_code":"o"
}
],
"conditions":[
{
"name":"caps_hyper",
"type":"variable_if",
"value":1
}
]
},
{
"type":"basic",
"from":{
"key_code":"semicolon"
},
"to":[
{
"key_code":"u",
"modifiers":[
"left_option"
]
},
{
"key_code":"o"
}
],
"conditions":[
{
"name":"caps_hyper",
"type":"variable_if",
"value":1
}
]
},
{
"type":"basic",
"from":{
"key_code":"quote"
},
"to":[
{
"key_code":"u",
"modifiers":[
"left_option"
]
},
{
"key_code":"a"
}
],
"conditions":[
{
"name":"caps_hyper",
"type":"variable_if",
"value":1
}
]
},
{
"type":"basic",
"from":{
"key_code":"open_bracket",
"modifiers":{
"mandatory":"shift"
}
},
"to":[
{
"key_code":"a",
"modifiers":[
"left_option",
"shift"
]
}
],
"conditions":[
{
"name":"caps_hyper",
"type":"variable_if",
"value":1
}
]
},
{
"type":"basic",
"from":{
"key_code":"semicolon",
"modifiers":{
"mandatory":"shift"
}
},
"to":[
{
"key_code":"u",
"modifiers":[
"left_option"
]
},
{
"key_code":"o",
"modifiers":[
"shift"
]
}
],
"conditions":[
{
"name":"caps_hyper",
"type":"variable_if",
"value":1
}
]
},
{
"type":"basic",
"from":{
"key_code":"quote",
"modifiers":{
"mandatory":"shift"
}
},
"to":[
{
"key_code":"u",
"modifiers":[
"left_option"
]
},
{
"key_code":"a",
"modifiers":[
"shift"
]
}
],
"conditions":[
{
"name":"caps_hyper",
"type":"variable_if",
"value":1
}
]
}
]
}
]
},
"devices":[
{
"disable_built_in_keyboard_if_exists":false,
"fn_function_keys":[
],
"identifiers":{
"is_keyboard":true,
"is_pointing_device":false,
"product_id":628,
"vendor_id":1452
},
"ignore":false,
"manipulate_caps_lock_led":true,
"simple_modifications":[
{
"from":{
"key_code":"caps_lock"
},
"to":{
"key_code":"escape"
}
}
]
},
{
"disable_built_in_keyboard_if_exists":false,
"fn_function_keys":[
{
"from":{
"key_code":"f1"
},
"to":{
"key_code":"f1"
}
},
{
"from":{
"key_code":"f2"
},
"to":{
"key_code":"f2"
}
},
{
"from":{
"key_code":"f3"
},
"to":{
"key_code":"f3"
}
},
{
"from":{
"key_code":"f4"
},
"to":{
"key_code":"f4"
}
},
{
"from":{
"key_code":"f5"
},
"to":{
"key_code":"f5"
}
},
{
"from":{
"key_code":"f6"
},
"to":{
"key_code":"f6"
}
},
{
"from":{
"key_code":"f7"
},
"to":{
"key_code":"f7"
}
},
{
"from":{
"key_code":"f8"
},
"to":{
"key_code":"f8"
}
},
{
"from":{
"key_code":"f9"
},
"to":{
"key_code":"9"
}
},
{
"from":{
"key_code":"f10"
},
"to":{
"key_code":"f10"
}
},
{
"from":{
"key_code":"f11"
},
"to":{
"key_code":"f11"
}
},
{
"from":{
"key_code":"f12"
},
"to":{
"key_code":"f12"
}
}
],
"identifiers":{
"is_keyboard":true,
"is_pointing_device":false,
"product_id":12384,
"vendor_id":65261
},
"ignore":false,
"manipulate_caps_lock_led":false,
"simple_modifications":[
]
}
],
"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",
"selected":true,
"simple_modifications":[
],
"virtual_hid_keyboard":{
"country_code":0
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment