Skip to content

Instantly share code, notes, and snippets.

@BerkeleyTrue
Created September 2, 2017 01:34
Show Gist options
  • Save BerkeleyTrue/999baab27f577f720ff18a44e6859380 to your computer and use it in GitHub Desktop.
Save BerkeleyTrue/999baab27f577f720ff18a44e6859380 to your computer and use it in GitHub Desktop.
{
"title": "SpaceKeys",
"rules": [
{
"description": "l/r shift => ()",
"manipulators": [
{
"description": "Change left shift press to (",
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_shift",
"modifiers": []
}
],
"to_if_alone": [
{
"key_code": "9",
"modifiers": [
"left_shift"
]
}
],
"type": "basic"
},
{
"description": "Change right shift press to )",
"from": {
"key_code": "right_shift",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_shift",
"modifiers": []
}
],
"to_if_alone": [
{
"key_code": "0",
"modifiers": [
"right_shift"
]
}
],
"type": "basic"
},
{
"description": "Noop '(' (left-shift)",
"from": {
"key_code": "9",
"modifiers": {
"mandatory": [
"left_shift"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "vk_none"
}
],
"type": "basic"
},
{
"description": "Noop '(' (right-shift)",
"from": {
"key_code": "9",
"modifiers": {
"mandatory": [
"right_shift"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "vk_none"
}
],
"type": "basic"
},
{
"description": "Noop ')' (left-shift)",
"from": {
"key_code": "0",
"modifiers": {
"mandatory": [
"left_shift"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "vk_none"
}
],
"type": "basic"
},
{
"description": "Noop ')' (right-shift)",
"from": {
"key_code": "0",
"modifiers": {
"mandatory": [
"right_shift"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "vk_none"
}
],
"type": "basic"
}
]
},
{
"description": "caps_lock => escape/control",
"manipulators": [
{
"description": "Change caps_lock to control+escape.",
"from": {
"key_code": "caps_lock"
},
"to": [
{
"key_code": "left_control"
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
},
{
"description": "Space hjkl => left/up/down/right",
"manipulators": [
{
"description": "Space as fn, used for special movements",
"from": {
"key_code": "spacebar",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "fn"
}
],
"to_if_alone": [
{
"key_code": "spacebar"
}
],
"type": "basic"
},
{
"description": "Space + h = LEFT",
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"fn"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"description": "Space + j = DOWN",
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"fn"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"description": "Space + k = UP",
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"fn"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"description": "Space + l = RIGHT",
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"fn"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment