Skip to content

Instantly share code, notes, and snippets.

@pacuna
Created July 4, 2018 21:27
Show Gist options
  • Save pacuna/19b8e0949921ea716fb6547bcbed8910 to your computer and use it in GitHub Desktop.
Save pacuna/19b8e0949921ea716fb6547bcbed8910 to your computer and use it in GitHub Desktop.
{
"title": "Use CAPS LOCK for pok3r navigation",
"rules": [{
"description": "CAPS LOCK + ijkl to arrow keys",
"manipulators": [{
"type": "basic",
"from": {
"key_code": "k",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "down_arrow"
}],
"conditions": [{
"type": "variable_if",
"name": "caps_lock pressed",
"value": 1
}]
}, {
"type": "basic",
"from": {
"key_code": "i",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "up_arrow"
}],
"conditions": [{
"type": "variable_if",
"name": "caps_lock pressed",
"value": 1
}]
}, {
"type": "basic",
"from": {
"key_code": "j",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "left_arrow"
}],
"conditions": [{
"type": "variable_if",
"name": "caps_lock pressed",
"value": 1
}]
}, {
"type": "basic",
"from": {
"key_code": "l",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"key_code": "right_arrow"
}],
"conditions": [{
"type": "variable_if",
"name": "caps_lock pressed",
"value": 1
}]
},
{
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"set_variable": {
"name": "caps_lock pressed",
"value": 1
}
}],
"to_after_key_up": [{
"set_variable": {
"name": "caps_lock pressed",
"value": 0
}
}]
}
]
},
{
"description": "CAPS LOCK + shift + hjkl to scroll",
"manipulators": [{
"type": "basic",
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"shift"
]
}
},
"to": [{
"mouse_key": {
"vertical_wheel": 40
}
}],
"conditions": [{
"type": "variable_if",
"name": "caps_lock pressed",
"value": 1
}]
}, {
"type": "basic",
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"shift"
]
}
},
"to": [{
"mouse_key": {
"vertical_wheel": -40
}
}],
"conditions": [{
"type": "variable_if",
"name": "caps_lock pressed",
"value": 1
}]
}, {
"type": "basic",
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"shift"
]
}
},
"to": [{
"mouse_key": {
"horizontal_wheel": -30
}
}],
"conditions": [{
"type": "variable_if",
"name": "caps_lock pressed",
"value": 1
}]
}, {
"type": "basic",
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"shift"
]
}
},
"to": [{
"mouse_key": {
"horizontal_wheel": -30
}
}],
"conditions": [{
"type": "variable_if",
"name": "caps_lock pressed",
"value": 1
}]
}, {
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [{
"set_variable": {
"name": "caps_lock pressed",
"value": 1
}
}],
"to_after_key_up": [{
"set_variable": {
"name": "caps_lock pressed",
"value": 0
}
}]
}]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment