From 60578c5fd3d6b72836e45c1d9110fb1ad9113a89 Mon Sep 17 00:00:00 2001 From: roodletoof <68161791+roodletoof@users.noreply.github.com> Date: Thu, 16 Jan 2025 23:12:24 +0100 Subject: [PATCH] added keyboard layout for kanata --- kanata.kbd | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 kanata.kbd diff --git a/kanata.kbd b/kanata.kbd new file mode 100644 index 0000000..cda720e --- /dev/null +++ b/kanata.kbd @@ -0,0 +1,81 @@ +#| +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 +) + +(defsrc + 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 + grv 1 2 3 4 5 6 7 8 9 0 - = bspc + tab q w e r t y u i o p [ ] \ + @cap a s d f g h j k l ; ' ret + lsft @zl x c v b n m , . @/l rsft + lctl lmet lalt @shsp ralt rmet rctl +) + +(deflayer symbols + grv 1 2 3 4 5 6 7 8 9 0 - = bspc + tab @` @m[ @m] @& @| @^ @_ @m- @+ @m= [ ] lrld + @cap @~ @bl @br @* @m\ bspc ret / tab ; ' ret + lsft @$ @{ @} @! @% n @: @< @> @m= rsft + lctl lmet lalt @shsp ralt rmet rctl +) + +(defalias + cap (tap-hold-press 200 200 esc lctl) + shsp (tap-hold-press 200 200 spc lsft) + zl (tap-hold-press 200 200 z (layer-while-held symbols)) + /l (tap-hold-press 200 200 / (layer-while-held symbols)) + bl S-9 + br S-0 + { (macro S-[) + } (macro S-]) + m[ (macro [) + m] (macro ]) + < S-, + > S-. + : S-; + % S-5 + ! S-1 + $ S-4 + ` grv + ~ S-grv + * S-8 + & S-7 + | (macro S-\) + m\ (macro \) + ^ S-6 + _ (macro S--) + m- (macro -) + + (macro S-=) + m= (macro =) +)