blob: 38ab562b13a9a57991018e3d6f8dec0594d6676f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/python
chord_data = {
"praw": "prawdopodobnie",
"pro": "probably",
}
output = "(defchordsv2-experimental\n"
for keys, macro in chord_data.items():
keys_formatted = " ".join(keys)
first_char_macro = macro[0]
# The rest of the macro characters are used in (unshift x)
macro_formatted = " ".join([f"(unshift {char})" for char in macro[1:]])
release = "all-released"
chord_line = f" ({keys_formatted}) (macro {first_char_macro} {macro_formatted}) 75 {release} (arrows)\n"
output += chord_line
output += ")\n"
file = open("chords.kbd", "w")
file.write(output)
file.close()
|