Skip to content

Instantly share code, notes, and snippets.

@icanswiftabit
Last active January 16, 2021 20:18
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save icanswiftabit/f91413052a95ad3f0ecf43ad9cfc0d53 to your computer and use it in GitHub Desktop.
Save icanswiftabit/f91413052a95ad3f0ecf43ad9cfc0d53 to your computer and use it in GitHub Desktop.
Arrow pad with caps_lock as toggle key
{
"title": "Arrow Key Pad",
"rules": [
{
"description": "Arrow Keypad Mode [Capslock as trigger key]",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "caps_lock"
},
"to": [
{
"set_variable": {
"name": "arrow_key_mode",
"value": 1
}
}
],
"conditions": [
{
"type": "variable_if",
"name": "arrow_key_mode",
"value": 0
}
]
},
{
"type": "basic",
"from": {
"key_code": "caps_lock"
},
"to": [
{
"set_variable": {
"name": "arrow_key_mode",
"value": 0
}
}
],
"conditions": [
{
"type": "variable_if",
"name": "arrow_key_mode",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "j",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"conditions": [
{
"type": "variable_if",
"name": "arrow_key_mode",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "k",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"conditions": [
{
"type": "variable_if",
"name": "arrow_key_mode",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "l",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"conditions": [
{
"type": "variable_if",
"name": "arrow_key_mode",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "i",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"conditions": [
{
"type": "variable_if",
"name": "arrow_key_mode",
"value": 1
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment