dotfiles

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

commit 2f7cbc76b62a6f8c87da9e8ca2740f9b9710a5c8
parent e804acd41010ec91d6c7066d1a6b4773b775c4da
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Mon, 23 Aug 2021 10:20:29 +0200

karabiner: customize mouse keys

Diffstat:
Dkarabiner/assets/complex_modifications/1629124626.json | 471-------------------------------------------------------------------------------
Akarabiner/assets/complex_modifications/mouse_keys.json | 141+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mkarabiner/karabiner.json | 182++++++++++++++++++++++++++++++++++++++++----------------------------------------
3 files changed, 232 insertions(+), 562 deletions(-)

diff --git a/karabiner/assets/complex_modifications/1629124626.json b/karabiner/assets/complex_modifications/1629124626.json @@ -1,471 +0,0 @@ -{ - "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/assets/complex_modifications/mouse_keys.json b/karabiner/assets/complex_modifications/mouse_keys.json @@ -0,0 +1,141 @@ +{ + "title": "Mouse keys", + "rules": [ + { + "description": "Mouse keys", + "manipulators": [ + { + "type": "basic", + "from": { "key_code": "tab", "modifiers": { "mandatory": [ "left_option" ], "optional": [ "any" ] } }, + "to": [ { "set_variable": { "name": "mouse_keys_full", "value": 1 } } ] + }, + { + "type": "basic", + "from": { "key_code": "left_option", "modifiers": { "optional": [ "any" ] } }, + "to": [ { "key_code": "left_option" } ], + "to_after_key_up": [ { "set_variable": { "name": "mouse_keys_full", "value": 0 } } ] + }, + + { + "type": "basic", + "from": { "key_code": "h", "modifiers": { "mandatory": [ "left_option" ], "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 } + ] + }, + { + "type": "basic", + "from": { "key_code": "left_shift", "modifiers": { "mandatory": [ "left_option" ], "optional": [ "any" ] } }, + "to": [ { "mouse_key": { "speed_multiplier": 2.0 } } ], + "conditions": [ + { "type": "variable_if", "name": "mouse_keys_full", "value": 1 } + ] + }, + { + "type": "basic", + "from": { "key_code": "semicolon", "modifiers": { "mandatory": [ "left_option" ], "optional": [ "any" ] } }, + "to": [ { "mouse_key": { "speed_multiplier": 0.5 } } ], + "conditions": [ + { "type": "variable_if", "name": "mouse_keys_full", "value": 1 } + ] + }, + + { + "type": "basic", + "from": { "key_code": "j", "modifiers": { "mandatory": [ "left_option" ], "optional": [ "any" ] } }, + "to": [ { "pointing_button": "button1" } ], + "conditions": [ + { "type": "variable_if", "name": "mouse_keys_full", "value": 1 } + ] + }, + { + "type": "basic", + "from": { "key_code": "k", "modifiers": { "mandatory": [ "left_option" ], "optional": [ "any" ] } }, + "to": [ { "pointing_button": "button3" } ], + "conditions": [ + { "type": "variable_if", "name": "mouse_keys_full", "value": 1 } + ] + }, + { "type": "basic", + "from": { "key_code": "l", "modifiers": { "mandatory": [ "left_option" ], "optional": [ "any" ] } }, + "to": [ { "pointing_button": "button2" } ], + "conditions": [ + { "type": "variable_if", "name": "mouse_keys_full", "value": 1 } + ] + }, + + { + "type": "basic", + "from": { "key_code": "a", "modifiers": { "mandatory": [ "left_option" ], "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": "a", "modifiers": { "mandatory": [ "left_option" ], "optional": [ "any" ] } }, + "to": [ { "mouse_key": { "x": -3072 } } ], + "conditions": [ { "type": "variable_if", "name": "mouse_keys_full", "value": 1 } ] + }, + + { + "type": "basic", + "from": { "key_code": "s", "modifiers": { "mandatory": [ "left_option" ], "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": "s", "modifiers": { "mandatory": [ "left_option" ], "optional": [ "any" ] } }, + "to": [ { "mouse_key": { "y": 3072 } } ], + "conditions": [ + { "type": "variable_if", "name": "mouse_keys_full", "value": 1 } + ] + }, + + { + "type": "basic", + "from": { "key_code": "d", "modifiers": { "mandatory": [ "left_option" ], "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": "d", "modifiers": { "mandatory": [ "left_option" ], "optional": [ "any" ] } }, + "to": [ { "mouse_key": { "x": 3072 } } ], + "conditions": [ + { "type": "variable_if", "name": "mouse_keys_full", "value": 1 } + ] + }, + + { + "type": "basic", + "from": { "key_code": "w", "modifiers": { "mandatory": [ "left_option" ], "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": "w", "modifiers": { "mandatory": [ "left_option" ], "optional": [ "any" ] } }, + "to": [ { "mouse_key": { "y": -3072 } } ], + "conditions": [ + { "type": "variable_if", "name": "mouse_keys_full", "value": 1 } + ] + } + ] + } + ] +} diff --git a/karabiner/karabiner.json b/karabiner/karabiner.json @@ -42,12 +42,15 @@ ] }, { - "description": "Mouse keys (full) (rev 4)", + "description": "Mouse keys", "manipulators": [ { "from": { - "key_code": "right_command", + "key_code": "tab", "modifiers": { + "mandatory": [ + "left_option" + ], "optional": [ "any" ] @@ -55,14 +58,9 @@ }, "to": [ { - "key_code": "right_command" - } - ], - "to_after_key_up": [ - { "set_variable": { "name": "mouse_keys_full", - "value": 0 + "value": 1 } } ], @@ -70,11 +68,8 @@ }, { "from": { - "key_code": "m", + "key_code": "left_option", "modifiers": { - "mandatory": [ - "right_command" - ], "optional": [ "any" ] @@ -82,9 +77,14 @@ }, "to": [ { + "key_code": "left_option" + } + ], + "to_after_key_up": [ + { "set_variable": { "name": "mouse_keys_full", - "value": 1 + "value": 0 } } ], @@ -96,18 +96,13 @@ "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" + "left_option" ], "optional": [ "any" @@ -116,8 +111,17 @@ }, "to": [ { - "mouse_key": { - "horizontal_wheel": 32 + "set_variable": { + "name": "mouse_keys_full_scroll", + "value": 1 + } + } + ], + "to_after_key_up": [ + { + "set_variable": { + "name": "mouse_keys_full_scroll", + "value": 0 } } ], @@ -129,18 +133,13 @@ "name": "mouse_keys_full", "type": "variable_if", "value": 1 - }, - { - "name": "mouse_keys_full_scroll", - "type": "variable_if", - "value": 1 } ], "from": { - "key_code": "j", + "key_code": "left_shift", "modifiers": { "mandatory": [ - "right_command" + "left_option" ], "optional": [ "any" @@ -150,7 +149,7 @@ "to": [ { "mouse_key": { - "vertical_wheel": 32 + "speed_multiplier": 2.0 } } ], @@ -162,18 +161,13 @@ "name": "mouse_keys_full", "type": "variable_if", "value": 1 - }, - { - "name": "mouse_keys_full_scroll", - "type": "variable_if", - "value": 1 } ], "from": { - "key_code": "k", + "key_code": "semicolon", "modifiers": { "mandatory": [ - "right_command" + "left_option" ], "optional": [ "any" @@ -183,7 +177,7 @@ "to": [ { "mouse_key": { - "vertical_wheel": -32 + "speed_multiplier": 0.5 } } ], @@ -195,18 +189,13 @@ "name": "mouse_keys_full", "type": "variable_if", "value": 1 - }, - { - "name": "mouse_keys_full_scroll", - "type": "variable_if", - "value": 1 } ], "from": { - "key_code": "l", + "key_code": "j", "modifiers": { "mandatory": [ - "right_command" + "left_option" ], "optional": [ "any" @@ -215,9 +204,7 @@ }, "to": [ { - "mouse_key": { - "horizontal_wheel": -32 - } + "pointing_button": "button1" } ], "type": "basic" @@ -231,10 +218,10 @@ } ], "from": { - "key_code": "h", + "key_code": "k", "modifiers": { "mandatory": [ - "right_command" + "left_option" ], "optional": [ "any" @@ -243,9 +230,7 @@ }, "to": [ { - "mouse_key": { - "x": -1536 - } + "pointing_button": "button3" } ], "type": "basic" @@ -259,10 +244,10 @@ } ], "from": { - "key_code": "j", + "key_code": "l", "modifiers": { "mandatory": [ - "right_command" + "left_option" ], "optional": [ "any" @@ -271,9 +256,7 @@ }, "to": [ { - "mouse_key": { - "y": 1536 - } + "pointing_button": "button2" } ], "type": "basic" @@ -284,13 +267,18 @@ "name": "mouse_keys_full", "type": "variable_if", "value": 1 + }, + { + "name": "mouse_keys_full_scroll", + "type": "variable_if", + "value": 1 } ], "from": { - "key_code": "k", + "key_code": "a", "modifiers": { "mandatory": [ - "right_command" + "left_option" ], "optional": [ "any" @@ -300,7 +288,7 @@ "to": [ { "mouse_key": { - "y": -1536 + "horizontal_wheel": 32 } } ], @@ -315,10 +303,10 @@ } ], "from": { - "key_code": "l", + "key_code": "a", "modifiers": { "mandatory": [ - "right_command" + "left_option" ], "optional": [ "any" @@ -328,7 +316,7 @@ "to": [ { "mouse_key": { - "x": 1536 + "x": -3072 } } ], @@ -340,13 +328,18 @@ "name": "mouse_keys_full", "type": "variable_if", "value": 1 + }, + { + "name": "mouse_keys_full_scroll", + "type": "variable_if", + "value": 1 } ], "from": { - "key_code": "v", + "key_code": "s", "modifiers": { "mandatory": [ - "right_command" + "left_option" ], "optional": [ "any" @@ -355,7 +348,9 @@ }, "to": [ { - "pointing_button": "button1" + "mouse_key": { + "vertical_wheel": 32 + } } ], "type": "basic" @@ -369,10 +364,10 @@ } ], "from": { - "key_code": "b", + "key_code": "s", "modifiers": { "mandatory": [ - "right_command" + "left_option" ], "optional": [ "any" @@ -381,7 +376,9 @@ }, "to": [ { - "pointing_button": "button3" + "mouse_key": { + "y": 3072 + } } ], "type": "basic" @@ -392,13 +389,18 @@ "name": "mouse_keys_full", "type": "variable_if", "value": 1 + }, + { + "name": "mouse_keys_full_scroll", + "type": "variable_if", + "value": 1 } ], "from": { - "key_code": "n", + "key_code": "d", "modifiers": { "mandatory": [ - "right_command" + "left_option" ], "optional": [ "any" @@ -407,7 +409,9 @@ }, "to": [ { - "pointing_button": "button2" + "mouse_key": { + "horizontal_wheel": -32 + } } ], "type": "basic" @@ -421,10 +425,10 @@ } ], "from": { - "key_code": "f", + "key_code": "d", "modifiers": { "mandatory": [ - "right_command" + "left_option" ], "optional": [ "any" @@ -434,7 +438,7 @@ "to": [ { "mouse_key": { - "speed_multiplier": 2.0 + "x": 3072 } } ], @@ -446,13 +450,18 @@ "name": "mouse_keys_full", "type": "variable_if", "value": 1 + }, + { + "name": "mouse_keys_full_scroll", + "type": "variable_if", + "value": 1 } ], "from": { - "key_code": "d", + "key_code": "w", "modifiers": { "mandatory": [ - "right_command" + "left_option" ], "optional": [ "any" @@ -462,7 +471,7 @@ "to": [ { "mouse_key": { - "speed_multiplier": 0.5 + "vertical_wheel": -32 } } ], @@ -477,10 +486,10 @@ } ], "from": { - "key_code": "s", + "key_code": "w", "modifiers": { "mandatory": [ - "right_command" + "left_option" ], "optional": [ "any" @@ -489,17 +498,8 @@ }, "to": [ { - "set_variable": { - "name": "mouse_keys_full_scroll", - "value": 1 - } - } - ], - "to_after_key_up": [ - { - "set_variable": { - "name": "mouse_keys_full_scroll", - "value": 0 + "mouse_key": { + "y": -3072 } } ],