Skip to content

Instantly share code, notes, and snippets.

@taylor-jones
Last active September 12, 2018 19:11
Show Gist options
  • Save taylor-jones/f6268823947471d1f0d463ddc4dbc5c2 to your computer and use it in GitHub Desktop.
Save taylor-jones/f6268823947471d1f0d463ddc4dbc5c2 to your computer and use it in GitHub Desktop.
Capslove Karabiner Config
{
"title": "Capslove V2",
"rules": [{
"description": "Capslove Base Home/End",
"manipulators": [{
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": {
"mandatory": [
"left_command"
],
"optional": [
"any"
]
}
},
"to": [{
"set_variable": {
"name": "capslove",
"value": 1
}
},
{
"key_code": "left_arrow",
"modifiers": [
"command"
]
}
],
"to_after_key_up": [{
"set_variable": {
"name": "capslove",
"value": 0
}
}]
},
{
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"set_variable": {
"name": "capslove",
"value": 1
}
}],
"to_if_alone": [{
"key_code": "right_arrow",
"modifiers": [
"command"
]
}],
"to_after_key_up": [{
"set_variable": {
"name": "capslove",
"value": 0
}
},
{
"set_variable": {
"name": "g_tapped",
"value": 0
}
},
{
"set_variable": {
"name": "d_flag",
"value": 0
}
}
],
"parameters": {
"basic.to_if_alone_timeout_milliseconds": 500
}
}
]
},
{
"description": "Capslove Navigation",
"manipulators": [{
"type": "basic",
"from": {
"key_code": "h",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "left_arrow"
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "l",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "right_arrow"
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "k",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "up_arrow"
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "j",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "down_arrow"
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "b",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "left_arrow",
"modifiers": [
"option"
]
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "e",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "right_arrow",
"modifiers": [
"option"
]
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
}
]
},
{
"description": "Capslove & G",
"manipulators": [{
"type": "basic",
"from": {
"key_code": "g",
"modifiers": {
"mandatory": [
"left_shift"
],
"optional": [
"any"
]
}
},
"to": [{
"key_code": "down_arrow",
"modifiers": [
"command"
]
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "g",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "up_arrow",
"modifiers": [
"command"
]
},
{
"set_variable": {
"name": "g_tapped",
"value": 0
}
}
],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
},
{
"type": "variable_if",
"name": "g_tapped",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "g",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"set_variable": {
"name": "g_tapped",
"value": 1
}
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
},
{
"type": "variable_if",
"name": "g_tapped",
"value": 0
}
]
}
]
},
{
"description": "Capslove & O",
"manipulators": [{
"type": "basic",
"from": {
"key_code": "o",
"modifiers": {
"mandatory": [
"left_command"
],
"optional": [
"any"
]
}
},
"to": [{
"key_code": "up_arrow"
},
{
"key_code": "right_arrow",
"modifiers": [
"command"
]
},
{
"key_code": "return_or_enter"
}
],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "o",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "right_arrow",
"modifiers": [
"command"
]
},
{
"key_code": "return_or_enter"
}
],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
}
]
},
{
"description": "Capslove & Q/Tab",
"manipulators": [{
"type": "basic",
"from": {
"key_code": "q",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "tab",
"modifiers": [
"control"
]
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
},
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com.apple.Safari"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "tab",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "tab",
"modifiers": [
"control",
"shift"
]
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
},
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com.apple.Safari"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "q",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "right_arrow",
"modifiers": [
"option",
"command"
]
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "tab",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "left_arrow",
"modifiers": [
"option",
"command"
]
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
}
]
},
{
"description": "Capslove & Single Letter/Key",
"manipulators": [{
"type": "basic",
"from": {
"key_code": "a",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "right_arrow"
},
{
"key_code": "spacebar"
}
],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "s",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "4",
"modifiers": [
"shift"
]
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "d",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "5",
"modifiers": [
"shift"
]
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "z",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "right_arrow"
},
{
"key_code": "comma"
}
],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "x",
"modifiers": {
"mandatory": [
"left_shift"
],
"optional": [
"any"
]
}
},
"to": [{
"key_code": "right_arrow"
},
{
"key_code": "semicolon"
}
],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "x",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "right_arrow"
},
{
"key_code": "period"
}
],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "spacebar",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "spacebar"
},
{
"key_code": "left_arrow"
},
{
"key_code": "spacebar"
}
],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "period",
"modifiers": {
"mandatory": [
"left_shift"
],
"optional": [
"any"
]
}
},
"to": [{
"key_code": "hyphen"
},
{
"key_code": "period",
"modifiers": [
"left_shift"
]
}
],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "period",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "equal_sign"
},
{
"key_code": "period",
"modifiers": [
"left_shift"
]
}
],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "delete_or_backspace",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "delete_or_backspace",
"modifiers": [
"fn"
]
}],
"conditions": [{
"type": "variable_if",
"name": "capslove",
"value": 1
}]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment