rvaiya / keyd

A key remapping daemon for linux.
MIT License
3.04k stars 173 forks source link

best way to implement home row mods #437

Closed kanishkaverma closed 1 year ago

kanishkaverma commented 1 year ago

Hey, I am trying to implement home row mods but I am not sure which option of the different overloads are better. I found a bunch of different issues on this topic. for example, here: image

I was wondering how and why one would use these options when implementing home row mods. are you please able to tell me which of these options is the best and how to determine the timeout amounts for each? Thank you so much for your time. warmest regards,
Kanishka

DocSunset commented 1 year ago

I'm far from an expert on this, and can't directly address your question about how the different options compare, but for what it's worth, I've just set up a home-row-mod-like mapping with much success using <key> = overloadt2(<layer>, <key>, <timeout>) with timeout set to 200, which appears to be the default tapping term in QMK firmware according to this article about home row mods:

As such, a good tapping term that fits you is one that prevents accidental mod activations and keeps the intended mod activations snappy. It is a delicate balance. ... In general, people choose something between 150ms and 220ms, with the default QMK setting for the tapping term set at 200ms. Don’t be scared to increase or decrease your tapping term as you see fit.

I would suggest you try the solutions herrsimon suggested and see what works for you. There is also some information in the man page about each of the overload variants. Make sure you are on a recent version of keyd; for example, I noticed that the AUR keyd package is rather out of date at the time of writing and doesn't include the overload variants at all, so had to use the keyd-git package.

kanishkaverma commented 1 year ago

so i have been playing around with home row mods and I love the ergonomics however, the delay between typing words and seeing stuff on the screen becomes really annoying. do you have any idea how I am able to eliminate that ? @DocSunset

DocSunset commented 1 year ago

The ZMK documentation linked in the issue you screen-captured suggests using a 'tap-preferred' or 'balanced' behavior.

As suggested by herrsimon, using a 'tap preferred' approach implemented with overloadt or a 'balanced' approach implemented with overloadt2, I don't notice any problematic delay with home row modifiers configured, e.g.:

a = overloadt2(shift, a, 200)
s = overloadt2(control, s, 200)
d = overloadt2(alt, d, 200)
f = overloadt2(meta, f, 200)
j = overloadt2(meta, j, 200)
k = overloadt2(alt, k, 200)
l = overloadt2(control, l, 200)
; = overloadt2(shift, ;, 200)

or

a = overloadt(shift, a, 200)
s = overloadt(control, s, 200)
d = overloadt(alt, d, 200)
f = overloadt(meta, f, 200)
j = overloadt(meta, j, 200)
k = overloadt(alt, k, 200)
l = overloadt(control, l, 200)
; = overloadt(shift, ;, 200)

In my attempts to use homerow modifiers with the other proposed hold-tap methods using timeout, I found these approaches unusable.

So based on this cursory experimentation, I would suggest you try both overloadt and overloadt2 with a default timeout of 200 ms, decide which one seems to work better for you, and then adjust the 200 ms timeout if needed. Your mileage may vary.

kanishkaverma commented 1 year ago

thank you so much for your help.