diff --git a/karabiner/.config/karabiner/karabiner.json b/karabiner/.config/karabiner/karabiner.json index 36d81a0..e4a8ccf 100644 --- a/karabiner/.config/karabiner/karabiner.json +++ b/karabiner/.config/karabiner/karabiner.json @@ -202,40 +202,6 @@ ], "type": "basic" }, - { - "conditions": [], - "from": { - "simultaneous": [ - { - "key_code": "s" - }, - { - "key_code": "d" - }, - { - "key_code": "f" - } - ], - "modifiers": { - "optional": [ - "any" - ] - } - }, - "to": [ - { - "key_code": "s", - "modifiers": [ - "left_option" - ] - }, - { - "key_code": "vk_none", - "modifiers": [] - } - ], - "type": "basic" - }, { "conditions": [], "from": { @@ -312,6 +278,169 @@ ], "type": "basic" }, + { + "conditions": [], + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "d" + }, + { + "key_code": "f" + } + ], + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "s", + "modifiers": [ + "left_option" + ] + }, + { + "key_code": "vk_none", + "modifiers": [] + } + ], + "type": "basic" + }, + { + "conditions": [], + "from": { + "simultaneous": [ + { + "key_code": "f" + }, + { + "key_code": "a" + }, + { + "key_code": "s" + }, + { + "key_code": "d" + } + ], + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "u", + "modifiers": [ + "left_option" + ] + }, + { + "key_code": "a", + "modifiers": [ + "left_shift" + ] + }, + { + "key_code": "vk_none", + "modifiers": [] + } + ], + "type": "basic" + }, + { + "conditions": [], + "from": { + "simultaneous": [ + { + "key_code": "j" + }, + { + "key_code": "k" + }, + { + "key_code": "l" + }, + { + "key_code": "semicolon" + } + ], + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "u", + "modifiers": [ + "left_option" + ] + }, + { + "key_code": "o", + "modifiers": [ + "left_shift" + ] + }, + { + "key_code": "vk_none", + "modifiers": [] + } + ], + "type": "basic" + }, + { + "conditions": [], + "from": { + "simultaneous": [ + { + "key_code": "j" + }, + { + "key_code": "i" + }, + { + "key_code": "o" + }, + { + "key_code": "p" + } + ], + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "u", + "modifiers": [ + "left_option" + ] + }, + { + "key_code": "u", + "modifiers": [ + "left_shift" + ] + }, + { + "key_code": "vk_none", + "modifiers": [] + } + ], + "type": "basic" + }, { "conditions": [], "from": { diff --git a/karabiner/.config/karabiner/karabiner.ts b/karabiner/.config/karabiner/karabiner.ts index e6a6bd1..770a362 100644 --- a/karabiner/.config/karabiner/karabiner.ts +++ b/karabiner/.config/karabiner/karabiner.ts @@ -14,6 +14,10 @@ function manipulators(): Array { bind(["i", "o", "p"], umlaut("u")), bind(["s", "d", "f"], [press("s", ["left_option"]), press("vk_none")]), + bind(["f", "a", "s", "d"], umlaut("a", true)), + bind(["j", "k", "l", "semicolon"], umlaut("o", true)), + bind(["j", "i", "o", "p"], umlaut("u", true)), + bind(["j", "l"], press("delete_or_backspace", ["left_option"])), bindCaps("d", press("9", ["shift"])), @@ -138,10 +142,10 @@ function from(key: string | string[], optional: string[] = ["any"]): From { } } -function umlaut(letter: string): To { +function umlaut(letter: string, capital: boolean = false): To { return [ press("u", ["left_option"]), - press(letter), + press(letter, capital ? ["left_shift"] : []), press("vk_none"), ]; } diff --git a/karabiner/.config/karabiner/update.sh b/karabiner/.config/karabiner/update.sh index b07b09b..e372be4 100755 --- a/karabiner/.config/karabiner/update.sh +++ b/karabiner/.config/karabiner/update.sh @@ -1,2 +1,5 @@ #!/bin/sh -yq -o=json config.yaml > karabiner.json + + +deno run ./karabiner.ts > karabiner.json +# yq -o=json config.yaml > karabiner.json