dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit bba3d36e81bbee11293d478d38925a82bce566b1
parent 84e4f42e0bc188c7919916e4c5c6310238c372f1
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Sun, 22 Aug 2021 12:26:31 +0200

karabiner: mouse control via keyboard

Diffstat:
Akarabiner/assets/complex_modifications/1629124626.json | 471+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mkarabiner/karabiner.json | 477++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 947 insertions(+), 1 deletion(-)

diff --git a/karabiner/assets/complex_modifications/1629124626.json b/karabiner/assets/complex_modifications/1629124626.json @@ -0,0 +1,471 @@ +{ + "title": "Mouse keys (full) (rev 4)", + "rules": [ + { + "description": "Mouse keys (full) (rev 4)", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "right_command", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "right_command" + } + ], + "to_after_key_up": [ + { + "set_variable": { + "name": "mouse_keys_full", + "value": 0 + } + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "m", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "mouse_keys_full", + "value": 1 + } + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "h", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "horizontal_wheel": 32 + } + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + }, + { + "type": "variable_if", + "name": "mouse_keys_full_scroll", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "j", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "vertical_wheel": 32 + } + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + }, + { + "type": "variable_if", + "name": "mouse_keys_full_scroll", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "k", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "vertical_wheel": -32 + } + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + }, + { + "type": "variable_if", + "name": "mouse_keys_full_scroll", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "l", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "horizontal_wheel": -32 + } + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + }, + { + "type": "variable_if", + "name": "mouse_keys_full_scroll", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "h", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "x": -1536 + } + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "j", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "y": 1536 + } + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "k", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "y": -1536 + } + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "l", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "x": 1536 + } + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "v", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "pointing_button": "button1" + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "b", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "pointing_button": "button3" + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "n", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "pointing_button": "button2" + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "f", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "speed_multiplier": 2.0 + } + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "d", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "speed_multiplier": 0.5 + } + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "s", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "mouse_keys_full_scroll", + "value": 1 + } + } + ], + "to_after_key_up": [ + { + "set_variable": { + "name": "mouse_keys_full_scroll", + "value": 0 + } + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "mouse_keys_full", + "value": 1 + } + ] + } + ] + } + ] +} diff --git a/karabiner/karabiner.json b/karabiner/karabiner.json @@ -40,6 +40,472 @@ "type": "basic" } ] + }, + { + "description": "Mouse keys (full) (rev 4)", + "manipulators": [ + { + "from": { + "key_code": "right_command", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "right_command" + } + ], + "to_after_key_up": [ + { + "set_variable": { + "name": "mouse_keys_full", + "value": 0 + } + } + ], + "type": "basic" + }, + { + "from": { + "key_code": "m", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "mouse_keys_full", + "value": 1 + } + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + }, + { + "name": "mouse_keys_full_scroll", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "h", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "horizontal_wheel": 32 + } + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + }, + { + "name": "mouse_keys_full_scroll", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "j", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "vertical_wheel": 32 + } + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + }, + { + "name": "mouse_keys_full_scroll", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "k", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "vertical_wheel": -32 + } + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + }, + { + "name": "mouse_keys_full_scroll", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "l", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "horizontal_wheel": -32 + } + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "h", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "x": -1536 + } + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "j", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "y": 1536 + } + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "k", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "y": -1536 + } + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "l", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "x": 1536 + } + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "v", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "pointing_button": "button1" + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "b", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "pointing_button": "button3" + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "n", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "pointing_button": "button2" + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "f", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "speed_multiplier": 2.0 + } + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "d", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "mouse_key": { + "speed_multiplier": 0.5 + } + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "name": "mouse_keys_full", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "s", + "modifiers": { + "mandatory": [ + "right_command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "mouse_keys_full_scroll", + "value": 1 + } + } + ], + "to_after_key_up": [ + { + "set_variable": { + "name": "mouse_keys_full_scroll", + "value": 0 + } + } + ], + "type": "basic" + } + ] } ] }, @@ -141,7 +607,16 @@ }, "ignore": false, "manipulate_caps_lock_led": false, - "simple_modifications": [] + "simple_modifications": [ + { + "from": { + "key_code": "application" + }, + "to": { + "key_code": "right_command" + } + } + ] } ], "fn_function_keys": [