Skip to content

Instantly share code, notes, and snippets.

@Hu-Wentao
Last active April 15, 2026 06:13
Show Gist options
  • Select an option

  • Save Hu-Wentao/c73145c73ca5756e54a1b83f8e14a556 to your computer and use it in GitHub Desktop.

Select an option

Save Hu-Wentao/c73145c73ca5756e54a1b83f8e14a556 to your computer and use it in GitHub Desktop.
Karabiner-Element SpaceFN
{
"description": "SpaceFN + B = Space(repeat)",
"manipulators": [
{
"type": "basic",
"conditions": [
{ "name": "spacefn_mode", "type": "variable_if", "value": 1 }
],
"from": {
"key_code": "b"
},
"to": [
{ "key_code": "spacebar" }
]
}
]
}
{
"description": "SpaceFN + D = Forward Delete",
"manipulators": [
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": { "key_code": "d" },
"to": [{ "key_code": "delete_forward" }],
"type": "basic"
}
]
}
{
"description": "SpaceFN: Activate",
"manipulators": [
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 0
}
],
"from": { "key_code": "spacebar" },
"parameters": { "basic.to_if_alone_timeout_milliseconds": 200 },
"to": [
{
"set_variable": {
"name": "spacefn_mode",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "spacefn_mode",
"value": 0
}
}
],
"to_if_alone": [{ "key_code": "spacebar" }],
"type": "basic"
}
]
}
{
"description": "SpaceFN: Space+[1234567890-=] to F[1-12]",
"manipulators": [
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": { "key_code": "1" },
"to": [{ "key_code": "f1" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": { "key_code": "2" },
"to": [{ "key_code": "f2" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": { "key_code": "3" },
"to": [{ "key_code": "f3" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": { "key_code": "4" },
"to": [{ "key_code": "f4" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": { "key_code": "5" },
"to": [{ "key_code": "f5" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": { "key_code": "6" },
"to": [{ "key_code": "f6" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": { "key_code": "7" },
"to": [{ "key_code": "f7" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": { "key_code": "8" },
"to": [{ "key_code": "f8" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": { "key_code": "9" },
"to": [{ "key_code": "f9" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": { "key_code": "0" },
"to": [{ "key_code": "f10" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": { "key_code": "hyphen" },
"to": [{ "key_code": "f11" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": { "key_code": "equal_sign" },
"to": [{ "key_code": "f12" }],
"type": "basic"
}
]
}
{
"description": "SpaceFN: Space+[hjkl] =(Left,Down,Up,Right)",
"manipulators": [
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "h",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "left_arrow" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "down_arrow" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "up_arrow" }],
"type": "basic"
},
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "l",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "right_arrow" }],
"type": "basic"
}
]
}
{
"description": "SpaceFN: Space+Backspace to Forward Delete",
"manipulators": [
{
"conditions": [
{
"name": "spacefn_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "delete_or_backspace"
},
"to": [{ "key_code": "delete_forward" }],
"type": "basic"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment