Skip to content

Instantly share code, notes, and snippets.

@kioku
Created February 17, 2025 21:17
Show Gist options
  • Save kioku/aadcdc0041f23146039016de468be53f to your computer and use it in GitHub Desktop.
Save kioku/aadcdc0041f23146039016de468be53f to your computer and use it in GitHub Desktop.
My Karabiner configuration
{
"profiles": [
{
"complex_modifications": {
"rules": [
{
"description": "Double Left Shift to Capslock",
"manipulators": [
{
"conditions": [
{
"name": "left_shift_pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "left_shift",
"modifiers": { "optional": ["any"] }
},
"parameters": { "basic.to_if_alone_timeout_milliseconds": 500 },
"to": [{ "key_code": "left_shift" }],
"to_if_alone": [
{ "key_code": "caps_lock" },
{
"set_variable": {
"name": "left_shift_pressed",
"value": 0
}
}
],
"type": "basic"
},
{
"from": {
"key_code": "left_shift",
"modifiers": { "optional": ["any"] }
},
"parameters": {
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 500
},
"to": [{ "key_code": "left_shift" }],
"to_delayed_action": {
"to_if_canceled": [
{
"set_variable": {
"name": "left_shift_pressed",
"value": 0
}
}
],
"to_if_invoked": [
{
"set_variable": {
"name": "left_shift_pressed",
"value": 0
}
}
]
},
"to_if_alone": [
{
"set_variable": {
"name": "left_shift_pressed",
"value": 1
}
},
{ "key_code": "left_shift" }
],
"type": "basic"
}
]
},
{
"description": "L_Control + u/o to pageup/pagedown",
"manipulators": [
{
"from": {
"key_code": "u",
"modifiers": {
"mandatory": ["left_control"],
"optional": ["any"]
}
},
"to": [{ "key_code": "page_up" }],
"type": "basic"
},
{
"from": {
"key_code": "o",
"modifiers": {
"mandatory": ["left_control"],
"optional": ["any"]
}
},
"to": [{ "key_code": "page_down" }],
"type": "basic"
}
]
},
{
"description": "L_Control + h/j/k/l to arrows",
"manipulators": [
{
"from": {
"key_code": "h",
"modifiers": {
"mandatory": ["left_control"],
"optional": ["any"]
}
},
"to": [{ "key_code": "left_arrow" }],
"type": "basic"
},
{
"from": {
"key_code": "j",
"modifiers": {
"mandatory": ["left_control"],
"optional": ["any"]
}
},
"to": [{ "key_code": "down_arrow" }],
"type": "basic"
},
{
"from": {
"key_code": "k",
"modifiers": {
"mandatory": ["left_control"],
"optional": ["any"]
}
},
"to": [{ "key_code": "up_arrow" }],
"type": "basic"
},
{
"from": {
"key_code": "l",
"modifiers": {
"mandatory": ["left_control"],
"optional": ["any"]
}
},
"to": [{ "key_code": "right_arrow" }],
"type": "basic"
}
]
}
]
},
"name": "Default profile",
"selected": true,
"simple_modifications": [
{
"from": { "key_code": "caps_lock" },
"to": [{ "key_code": "left_control" }]
}
],
"virtual_hid_keyboard": { "keyboard_type_v2": "ansi" }
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment