Last active
August 22, 2019 13:41
-
-
Save clemsam/ef03ed5127fd9783267b60065c70fc17 to your computer and use it in GitHub Desktop.
This file contains 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": "Mission control, elaborate", | |
"rules":[ | |
{ "description": "Mission control, elaborate; requires Ctrl, Shft & arrows. Was created to make movements in Mission Control 'key-able', but works in all apps.", | |
"manipulators": [ | |
{ "from": { | |
"key_code": "right_arrow", | |
"modifiers": { | |
"mandatory": ["control", | |
"shift"] } }, | |
"to": [ | |
{ "mouse_key": {"x": 3072} }, | |
{ "mouse_key": {"x": 3072} }, | |
{ "mouse_key": {"x": 3072} }, | |
{ "mouse_key": {"x": 3072} }, | |
{ "mouse_key": {"x": 3072} }, | |
{ "mouse_key": {"x": 3072} }, | |
{ "mouse_key": {"x": 3072} }, | |
{ "mouse_key": {"x": 3072}, | |
"repeat": false } | |
], | |
"type": "basic" | |
}, | |
{ "from": { | |
"key_code": "left_arrow", | |
"modifiers": { | |
"mandatory": ["control", | |
"shift"] } }, | |
"to": [ | |
{ "mouse_key": {"x": -3072} }, | |
{ "mouse_key": {"x": -3072} }, | |
{ "mouse_key": {"x": -3072} }, | |
{ "mouse_key": {"x": -3072} }, | |
{ "mouse_key": {"x": -3072} }, | |
{ "mouse_key": {"x": -3072} }, | |
{ "mouse_key": {"x": -3072} }, | |
{ "mouse_key": {"x": -3072}, | |
"repeat": false } | |
], | |
"type": "basic" | |
}, | |
{ "from": { | |
"key_code": "down_arrow", | |
"modifiers": { | |
"mandatory": ["control", | |
"shift"] } }, | |
"to": [ | |
{ "mouse_key": {"y": 3072} }, | |
{ "mouse_key": {"y": 3072} }, | |
{ "mouse_key": {"y": 3072} }, | |
{ "mouse_key": {"y": 3072} }, | |
{ "mouse_key": {"y": 3072} }, | |
{ "mouse_key": {"y": 3072} }, | |
{ "mouse_key": {"y": 3072} }, | |
{ "mouse_key": {"y": 3072}, | |
"repeat": false } | |
], | |
"type": "basic" | |
}, | |
{ "from": { | |
"key_code": "up_arrow", | |
"modifiers": { | |
"mandatory": ["control", | |
"shift"] } }, | |
"to": [ | |
{ "mouse_key": {"y": -3072} }, | |
{ "mouse_key": {"y": -3072} }, | |
{ "mouse_key": {"y": -3072} }, | |
{ "mouse_key": {"y": -3072} }, | |
{ "mouse_key": {"y": -3072} }, | |
{ "mouse_key": {"y": -3072} }, | |
{ "mouse_key": {"y": -3072} }, | |
{ "mouse_key": {"y": -3072}, | |
"repeat": false } | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "return_or_enter", | |
"modifiers": { | |
"mandatory": ["control", | |
"shift"] } }, | |
"to": [ | |
{ "pointing_button": "button1" } ], | |
"type": "basic" | |
} | |
] } ] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The above code, imported into Karabiner Elements' "Complex Modifications", makes your cursor "jump" via arrow-key-directing –
IF Shift and Control are pressed along with them.
Unfortunately "Mission Control" does NOT react to any shortcuts (except to change Spaces).
This script will be effective in every application (otherwise –for ONLY Mission-Control– I'd have reduced keys pressed to arrow keys)…
… as Mission-Control's "frontmost_application" is always the one selected before (and in) M-C, I could not make an M-C-only script.)
The amount of repeated "mouse_key"s should be adapted individually to suit your mouse-velocity and screen resolution
(e.g.: cut 1 or more complete "mouse_key" lines to shorten the jump; do so for each direction).
Max values for "mouse_key" "x" and "y" are (pos.&neg.) 3072; higher values devaluate these numbers in crazy ways.