jbensmann / mouseless

A replacement for the mouse in Linux
MIT License
167 stars 16 forks source link

A setting to type an origial key if another key is not pressed after hold the key? #40

Closed junaruga closed 8 months ago

junaruga commented 8 months ago

Thank you for this amazing tool! I really enjoy it.

This issue ticket is just for a question or a suggestion for a new feature. I am experimenting with the following setting.

layers:
- name: base
  bindings:
    ...
    j: tap-hold j ; rightshift ; 300
    ...

When the "j" key is pressed longer than 300 ms, but any other keys are pressed after the "j" key, I want to type "j". Is there a way to do it?

I also tried another setting j: tap-hold-next j ; rightshift ; 300 too. I don't understand the difference in the behaviors tap-hold and tap-hold-next in this case.

jbensmann commented 8 months ago

Hi, if I understand it correctly you can imply increase the timeout (or even disable it with 0), since the only thing it does is invoking rightshift when no other key is pressed for 300 ms, which you don't want.

In this case you don't want tap-hold, since it only invokes rightshift after the timeout, not when another key is pressed while j is still held down. tab-hold-next-release would probably even better since it reduces the chance of accidentally invoking rightshift when typing fast and the key presses overlap (e.g. j down, a down, j up, a up will result in j + a instead of rightshift + a like with tap-hold-next).

junaruga commented 8 months ago

Hi,

Thank you for your help. I can see the following setting with tap-hold-next-release and disabled timeout 0 works the best for holding keys!

j: tap-hold-next-release j ; rightshift ; 0

Increasing the timeout sec was not an option for tap-hold, because when pressing holding "j" less than the timeout (as shift) + pressing "f", the "j" is not recognized as shift, and the "jf" is typed.

I would close this ticket. Thank you!