manna-harbour / qmk_firmware

See the "forkreadme" branch or the following link for a description of branches maintained in this fork.
https://github.com/manna-harbour/qmk_firmware/blob/forkreadme/readme.org
GNU General Public License v2.0
281 stars 64 forks source link

Bilateral Combinations #29

Open manna-harbour opened 3 years ago

manna-harbour commented 3 years ago

Bilateral Combinations

The last mod-tap hold will be converted to the corresponding mod-tap tap if another key on the same hand is tapped during the hold, unless a key on the other hand is tapped first.

This option can be used to prevent accidental modifier combinations with mod-tap, in particular those caused by rollover on home row mods.

This is a proof of concept implementation. Please note the known issues.

A more correct implementation based on per-keypair tapping term is planned for the future. If successful, the current implementation will be dropped. If not, issues with the current implementation will be addressed and a PR submitted upstream.

cfarvidson commented 3 years ago

This would be great!

Any chance to get a PER_KEY for this feature?

bgl314 commented 1 year ago

I like mods on my left thumbs, and was frustrated waiting for the timeout before them being active with mod-taps on the same side. I added the below to the start of the bilateral_combinations_hold function to avoid my thumb row. I also define in my config.h: `

define BILATERAL_COMBINATIONS 500

define BILATERAL_COMBINATIONS_EXCEPTION_ROW 3

in action.c: static void bilateral_combinations_hold(action_t action, keyevent_t event) { # ifdef BILATERAL_COMBINATIONS_EXCEPTION_ROW if(event.key.row == BILATERAL_COMBINATIONS_EXCEPTION_ROW || event.key.row == BILATERAL_COMBINATIONS_EXCEPTION_ROW + MATRIX_ROWS / 2) return; # endif ... `