-
-
Save alexpersian/e146b45ed0f493c11d5cafbb8fe0c425 to your computer and use it in GitHub Desktop.
Arrow pad with caps_lock as toggle key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "WASD Arrow Keys", | |
"rules": [ | |
{ | |
"description": "WASD Mode [Capslock as trigger key]", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "caps_lock" | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "wasd_key_mode", | |
"value": 1 | |
} | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "wasd_key_mode", | |
"value": 0 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "caps_lock" | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "wasd_key_mode", | |
"value": 0 | |
} | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "wasd_key_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "a", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "wasd_key_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "s", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "down_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "wasd_key_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "d", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "wasd_key_mode", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "w", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "up_arrow" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "wasd_key_mode", | |
"value": 1 | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment