This commit is contained in:
Leon Kowarschick 2024-02-29 10:49:21 +01:00
parent cdb1568566
commit 2b61bbf06f
Signed by: ElKowar
GPG key ID: 72C759DA738DE3A2
3 changed files with 173 additions and 37 deletions

View file

@ -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": {

View file

@ -14,6 +14,10 @@ function manipulators(): Array<Mapping> {
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"),
];
}

View file

@ -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