jtroo / kanata

Improve keyboard comfort and usability with advanced customization
GNU Lesser General Public License v3.0
2.49k stars 121 forks source link

Help me with double tap and hold behavior #1318

Closed sohanemon closed 3 hours ago

sohanemon commented 4 hours ago

Requirements

Describe the bug

I frequently use j and k in Neovim for navigating up and down by holding the keys. However, with the home row mods enabled, I now have to tap j and k repeatedly to move, as holding them doesn't work for continuous movement.

Relevant kanata config

;; home row mods tap (multi (layer-switch empty_layer) (on-idle-fakekey to-base tap 20) ) lalt (multi lalt (tap-hold-release 0 $ht lalt @inner-nav) ) ralt (multi ralt (tap-hold-release 0 $ht ralt @inner-nav) ) app (multi lmet lsft lalt (layer-toggle empty_layer) )

a (tap-hold-release-keys $tt $mht (multi a @tap) lmet $left-hand-keys) s (tap-hold-release-keys $tt $mht (multi s @tap) @lalt $left-hand-keys) d (tap-hold-release-keys $tt $mht (multi d @tap) lsft $left-hand-keys) f (tap-hold-release-keys $tt $mht (multi f @tap) lctl $left-hand-keys) g (tap-hold-release-keys $tt $mht (multi g @tap) @app $left-hand-keys) h (tap-hold-release-keys $tt $mht (multi h @tap) @app $right-hand-keys) j (tap-hold-release-keys $tt $mht (multi j @tap) rctl $right-hand-keys) k (tap-hold-release-keys $tt $mht (multi k @tap) rsft $right-hand-keys) l (tap-hold-release-keys $tt $mht (multi l @tap) @ralt $right-hand-keys) ; (tap-hold-release-keys $tt $mht (multi ; @tap) rmet $right-hand-keys) )

To Reproduce

1. 2. 3.

Expected behavior

A single tap sends j. Holding j acts as rctl. Double-tapping and holding j keeps it in the j state instead of switching to rctl.

Kanata version

1.6.1

Debug logs

No response

Operating system

Linux

Additional context

No response

jtroo commented 3 hours ago
  1. Put your config within two sets of triple-backquotes ``` to avoid pinging people and to format it properly.
  2. Read the doc and understand "tap timeout" https://github.com/jtroo/kanata/blob/main/docs/config.adoc#tap-hold
  3. If there is a real bug, do state as such. My current guess is your $tt value is not suitable.
sohanemon commented 3 hours ago

Thank you so much for your quick help. I increased the $tt value and it is fixed