From 5c33efe76c0bf03cba49870d6a839a3e0e0f5fe2 Mon Sep 17 00:00:00 2001 From: Greg Date: Thu, 5 Mar 2026 23:12:46 +0200 Subject: [PATCH] . --- .config/kanata/kanata.kbd | 122 ++++++++++++++++++++++++++++++++++++++ .config/sway/config | 1 - 2 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 .config/kanata/kanata.kbd diff --git a/.config/kanata/kanata.kbd b/.config/kanata/kanata.kbd new file mode 100644 index 0000000..b6d54c3 --- /dev/null +++ b/.config/kanata/kanata.kbd @@ -0,0 +1,122 @@ +#| +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 + linux-device-detect-mode keyboard-only + linux-dev /dev/input/event3 + linux-dev-names-include ("AT Translated Set 2 keyboard") + concurrent-tap-hold yes +) + +(defvar + tap-repress-timeout 200 + hold-timeout 200 + ht $hold-timeout + tt $tap-repress-timeout +) + +(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 rctl +) + + +(defalias + ;; home row mods + a (tap-hold-press $tt $ht a lalt ) + s (tap-hold-press $tt $ht s lmet ) + d (tap-hold-press $tt $ht d lctl ) + f (tap-hold-press $tt $ht f lsft ) + + ; (tap-hold-press $tt $ht ; lalt ) + l (tap-hold-press $tt $ht l lmet ) + k (tap-hold-press $tt $ht k lctl ) + j (tap-hold-press $tt $ht j lsft ) + + spc (tap-hold-press $tt $ht spc (layer-toggle syms)) + ralt (tap-hold-press $tt $ht bspc (layer-toggle navig)) + + _ S-min + dq (unicode r#"""#) + ! S-1 + @ S-2 + # S-3 + $ S-4 + % S-5 + & S-7 + * S-8 + lp S-9 + rp S-0 + ? S-/ + < S-, + > S-. + : S-; + | S-\ + { S-[ + } S-] + ~ S-` +) + +(deflayermap (base) + a @a + s @s + d @d + f @f + + ; @; + l @l + k @k + j @j + + lalt ret + spc @spc + ralt @ralt +) + +(defchordsv2 + (d k) esc 50 all-released () +) + +(deflayer syms + _ _ _ _ _ _ _ _ _ _ _ _ _ _ + @~ @! @@ @# @$ @% 7 8 9 - = / _ + ` @? @< @> @lp @rp 4 5 6 + @: @dq _ _ + _ @& @_ @{ @} [ ] 1 2 3 @* / @| + _ _ _ _ esc 0 +) + +(deflayer navig + _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ up _ _ _ _ + _ _ _ _ _ _ _ left down right _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ +) + + + diff --git a/.config/sway/config b/.config/sway/config index 51d3a74..69ecd0d 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -116,7 +116,6 @@ focus_on_window_activation focus input "type:touchpad" { dwt enabled - dwtp enabled tap enabled natural_scroll enabled tap_button_map lrm