summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kanata/.gitignore1
-rwxr-xr-xkanata/chords.py26
-rw-r--r--kanata/kanata.kbd58
3 files changed, 52 insertions, 33 deletions
diff --git a/kanata/.gitignore b/kanata/.gitignore
new file mode 100644
index 0000000..cf08c3a
--- /dev/null
+++ b/kanata/.gitignore
@@ -0,0 +1 @@
+chords.kbd
diff --git a/kanata/chords.py b/kanata/chords.py
new file mode 100755
index 0000000..38ab562
--- /dev/null
+++ b/kanata/chords.py
@@ -0,0 +1,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()
diff --git a/kanata/kanata.kbd b/kanata/kanata.kbd
index b559d14..6cc3782 100644
--- a/kanata/kanata.kbd
+++ b/kanata/kanata.kbd
@@ -1,49 +1,41 @@
-#|
-This minimal config changes Caps Lock to act as Caps Lock on quick tap, but
-if held, it will act as Left Ctrl. It also changes the backtick/grave key to
-act as backtick/grave on quick tap, but change ijkl keys to arrow keys on hold.
-
-This text between the two pipe+octothorpe sequences is a multi-line comment.
-|#
-
-;; Text after double-semicolons are single-line comments.
-
-#|
-One defcfg entry may be added, which is used for configuration key-pairs. These
-configurations change kanata's behaviour at a more global level than the other
-configuration entries.
-|#
-
(defcfg
- #|
- This configuration will process all keys pressed inside of kanata, even if
- they are not mapped in defsrc. This is so that certain actions can activate
- at the right time for certain input sequences. By default, unmapped keys are
- not processed through kanata due to a Windows issue related to AltGr. If you
- use AltGr in your keyboard, you will likely want to follow the simple.kbd
- file while unmapping lctl and ralt from defsrc.
- |#
process-unmapped-keys yes
+ concurrent-tap-hold yes
+ chords-v2-min-idle-experimental 200
)
(defsrc
- caps
- h j k l
- lsft rsft
+ grv 1 2 3 4 5 6 7 8 9 0 - = bspc
+ tab q w e r t y u i o p [ ] \
+ caps a s d f g h j k l ; ' ret
+ lsft z x c v b n m , . / rsft
+ lctl lmet lalt spc ralt rmet rctl
)
(deflayer default
- @cap
- _ _ _ _
- _ _
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ @cap _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ _ _ _ _
)
(deflayer arrows
- _
- left down up rght
- _ _
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ @crg _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ _ _ _ left down up rght _ _ _
+ _ _ _ _ _ @cle _ _ _ _ _ _
+ _ _ _ _ _ _ _
)
(defalias
cap (tap-hold-press 200 200 esc (layer-toggle arrows))
+ cle C-left
+ crg C-rght
)
+
+(include chords.kbd)
+
+;;(defchordsv2-experimental
+;; (a s d) (macro h (unshift e) (unshift l) (unshift l) (unshift o)) 75 all-released (arrows)
+;;)