qmk / qmk_firmware

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

tap-hold processing #24019

Closed orthodogz closed 2 days ago

orthodogz commented 2 days ago

Description

This PR purpose is to fix the problem with processing multiple hold actions and one tap action when PERMISSIVE_HOLD is defined and TAPPING_TERM hasn't elapsed. When such conditions are met, keys not fired, contrary to the PERMISSIVE_HOLD decision mode and the firmware continues to wait for new actions in reset state of process_tapping SM. To trigger hold actions selection user have to tap amount of keys equal to holded keys. This PR fix this by adding deferring tap key entity that indicate that processing of hold actions must be continued till tap key. As side effect of this fix, bigger number of simultaneous hold actions now can be fired in PERMISSIVE_HOLD style decision: (WAITING_BUFFER_SIZE - 1) vs old ceiling(WAITING_BUFFER_SIZE/3). This is just a draft and I totally not qualified enough for this so I will be happy if someone with experience take a look at the issue and make more consistent alternation in process_tapping if appropriate.

Types of Changes

Issues Fixed or Closed by This PR

Checklist

orthodogz commented 2 days ago

This request is messed up, please check #24021