Dygmalab / Bazecor

Graphical configurator for Dygma Products
https://dygma.com/
GNU General Public License v3.0
393 stars 87 forks source link

Dual function keys, always hold on another key press #675

Open joakin opened 9 months ago

joakin commented 9 months ago

Is your feature request related to a problem? Please describe. I've encountered a problem with one of the thumb keys where I want the Escape function on tap and Ctrl on hold. When I type very quickly, rapid input of Ctrl+<letter> sometimes doesn't register as a hold, and I get an Esc+<letter> instead.

This issue is similar to one I experienced with a QMK keyboard, which I resolved by enabling HOLD_ON_OTHER_KEY_PRESS in the configuration.

Essentially, I want the keyboard to treat any key press as a hold if another key is pressed simultaneously, without any timeouts or complications—if no other key is touched, it should register as a tap.

I've attempted to tweak the dual function key threshold settings and lowered the keys-overlap to 0 to ensure the hold function is recognized, but I continue to experience the same problem. I also tried reducing the Hold Timeout to 1, but then the tap function is never recognized, even when no other key is pressed, so Esc never fires.

Describe the solution you'd like I'd like to have a feature or setting implemented that handles rapid keypresses more accurately by always treating a key press as a hold when any other key is activated, similar to the HOLD_ON_OTHER_KEY_PRESS feature in QMK keyboards.

Describe alternatives you've considered As mentioned, I've played around with the dual function key threshold and Hold Timeout settings, but neither has provided a satisfactory solution. I've had to stop using dual function keys and split the key into two places.

Additional context The current behavior interrupts the flow of typing and could be a significant hindrance for fast typists using dual-function keys.

Co3co commented 5 months ago

This feature would be amazing. Dual function keys are unusable right now because of these nonsensical delays. This could all be solved by just doing what other programs (such as keyd) do.

PapaNappa commented 4 months ago

Occasionally, I fall for this behaviour as well.

For me, I have Ctrl/Backspace on a thumb key (I think this is the default for the Defy). Sometimes, holding Ctrl and pressing another key, is registered as <Backspace>, <key>, instead of <Ctrl>+<key>.

However, what I observed, is that this only happens when you quickly let go of the other key first.

So, this works as expected, registering as <Ctrl>+<s>: <Ctrl/Bsp> down, <s> down, <s> up, <Ctrl/Bsp> up

However, this is registered as <Backspace>, <s>, when typed quickly: <Ctrl/Bsp> down, <s> down, <Ctrl/Bsp> up, <s> up

The question is: is this desired behaviour, or not? Mostly, I would prefer having both sequences registed as <Ctrl>+<s>.