keymapper icon indicating copy to clipboard operation
keymapper copied to clipboard

BUG: Unexpected behavior with chords + timeout mappings

Open arutonee1 opened this issue 1 year ago • 3 comments

Bug

Given a configuration like this:

Q{500ms} >> Virtual1^Virtual1

(Q W) >> A
(Q  ) >> B

the chord QW will result in ba if Q is pressed first, and just a only if Q is pressed second. The expected behavior is holding Q resulting in another layer until released, tapping Q resulting in b, and pressing QW (regardless of order) resulting in a.

Reproduction steps:

  • See above

OS Details:

  • OS: NixOS Unstable
  • Kernel: 6.6.18
  • DE: Hyprland

arutonee1 avatar Mar 08 '24 15:03 arutonee1

I ran across another timing issue related to virtual keys. With the below config, pressing F4{ShiftLeft} will block all input for 5s. Pressing ShiftLeft or F4{ShiftLeft} do not release the block either. I experimented with moving the 5000ms to various configurations but the end result seemed to be the same.

KeyLock = Virtual10

[default]
  F4{ShiftLeft}   >> KeyLock ^ 5000ms KeyLock

[modifier="KeyLock"]
  ShiftLeft     >> KeyLock ^

ristomatti avatar Mar 08 '24 17:03 ristomatti

Hi, thanks for reporting! @arutonee1 this is indeed surprising, but conforms with the documented Functional principle. But I will see if I can fix it somehow.

@ristomatti currently timeouts in the output simply defer all subsequent output. So this is not a bug but expected behavior. You may want to create a feature request if you think that concurrently scheduled output would be important.

houmain avatar Mar 16 '24 18:03 houmain

@houmain Thanks for the clarification. I'll consider it but I guess with #105 something like this could be done externally. Rather it was a bit unexpected since it completely blocked input.

ristomatti avatar Mar 17 '24 16:03 ristomatti