qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.24k stars 39.3k forks source link

[Feature Request] Instant tap dance #12328

Closed LazaroFilm closed 2 years ago

LazaroFilm commented 3 years ago

Feature Request Type

Description

I have a Tap Dance that changes my Shift key into Caps Lock when double tapped. However, if pressed once only, the shift only starts at the end of the tapping term which is slowing me down when using shift as a modifier with the mouse in my CAD program. What I would like to achieve is something like this:

o = key press
Time ----->
Tap dance currently:
-single tap-
o------------------------
NOTHING-----SHIFT--------
-double tap-
o-----------o------------
NOTHING-----CAPS-LOCK----

What I would like to do:
-single tap-
o------------------------
SHIFT--------------------
-double tap-
o-----------o------------
SHIFT-------CAPS-LOCK----

Is that achievable with QMK? If so, how can I achieve it? If not, could I request it as a feature?

tangor86 commented 3 years ago

not sure if I can do that but I would vote for this issue to be resolved... there is no reason for the delay if the key was already released...

trudkin commented 3 years ago

I am hardly the one to decide if this should be an enhancement. But I believe the performance you are looking for can be achieved by using '''get_tapping_term''' and '''get_permissive_hold'''. Both are documented here Tap-Hold Configuration Options With some combination of the two you should get closer to what you are looking for performance wise.

IsaacElenbaas commented 3 years ago

The reason Mod Taps and Tap Dance do not do this currently is because of the GUI mod. Windows would open the start menu. The same behavior may occur with ALT, but I do not remember.

bodograumann commented 3 years ago

Do I understand correctly, that this would be solved by making PERMISSIVE_HOLD have effect on tap-dances? That would be something I'd really like to see. I have some (mildly complex) tap/hold combinations defined with Oryx on my Ergodox EZ through tap dance, but because they are only differentiated by the TAPPING_TERM I get a lot of false positives, making the functionality unusable :cry:. (Shift-K / Shift; Shift-J / Shift; Ctrl-J / Ctrl; Ctrl-6 / Super; Ctrl-W / MO(1); Esc / MO(1); Meta+H / Super; Meta+L / Ctrl)

IsaacElenbaas commented 3 years ago

Just a bit of trivia, PERMISSIVE_HOLD actually doesn't change the modifier activation time, see here. Why, I have no clue - my pull hooking into that section of the code for Retro Shift registers immediately with no issues. But yes, it should, and Tap Dance could probably register sooner too if it respected PERMISSIVE_HOLD, though I'm not familiar with its code.

What @LazaroFilm describes, at least, can easily be accomplished with custom Tap Dance functions. Ideally Tap Dance would change its key registration time based on whether there even is a single/double tap action it could use instead, but that would be ridiculously complicated.

Tap Dance does respect TAPPING_TERM_PER_KEY, by the way, which could help you cut down on those false positives.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs. For maintainers: Please label with bug, in progress, on hold, discussion or to do to prevent the issue from being re-flagged.

stale[bot] commented 2 years ago

This issue has been automatically closed because it has not had activity in the last 30 days. If this issue is still valid, re-open the issue and let us know.