keymapper icon indicating copy to clipboard operation
keymapper copied to clipboard

A strange performance

Open yyy33 opened this issue 3 years ago • 1 comments

I'm not very good at English, I don't know if the author can understand what I mean

  1. This is my profile
CapsLock{H} >> A
(CapsLock AltLeft) >> B
  1. When I press and hold cpaslock and altleft, then i press H , at this time I receive the character B, which is normal

  2. Release the H key (at this time cpaslock and altleft are still held down), then press and release the H key, at this time I do not receive the character B, but the character A,Shouldn't I still be receiving character B at this point?

  3. change my profile to

(CapsLock AltLeft) >> B
CapsLock{H} >> A

5.Everything is behaving normally

yyy33 avatar Sep 19 '22 08:09 yyy33

I tried your configuration but, sorry I did not notice anything baffling. B is being repeated as long as only CapsLock and AltLeft are hold. Then, when I press H it keeps repeating A. I did not even notice a difference between your two configurations (I tested it on Linux).

houmain avatar Oct 22 '22 11:10 houmain

I tried your configuration but, sorry I did not notice anything baffling. B is being repeated as long as only CapsLock and AltLeft are hold. Then, when I press H it keeps repeating A. I did not even notice a difference between your two configurations (I tested it on Linux).

Hi, can you test it again, sorry, my configuration file is wrong, the configuration file for the first step should be

CapsLock{H} >> A
(CapsLock AltLeft){H} >> B

The configuration file for step 4 should be

(CapsLock AltLeft){H} >> B
CapsLock{H} >> A

yyy33 avatar Nov 28 '22 11:11 yyy33

Hi, I tried your configuration. Now I can see what you mean. But this is intended behavior. First the AltLeft prevents the first mapping from applying. But once the AltLeft matched in the second mapping, it becomes optional.

Consider the following example. Pressing Meta{A{B}} with this configuration:

Meta{A} >> R
Meta{B} >> S

would output R and S instead of R and B. So the A between Meta and B is also ignored, since it already matched once.

Instead of switching the order of your mappings you could also write:

!AltLeft CapsLock{H} >> A
(CapsLock AltLeft){H} >> B

houmain avatar Nov 28 '22 16:11 houmain

Hi, I tried your configuration. Now I can see what you mean. But this is intended behavior. First the AltLeft prevents the first mapping from applying. But once the AltLeft matched in the second mapping, it becomes optional.

Consider the following example. Pressing Meta{A{B}} with this configuration:

Meta{A} >> R
Meta{B} >> S

would output R and S instead of R and B. So the A between Meta and B is also ignored, since it already matched once.

Instead of switching the order of your mappings you could also write:

!AltLeft CapsLock{H} >> A
(CapsLock AltLeft){H} >> B

Thanks for the reply, I didn't understand it, but I think I need to read the keymapper code to understand it, but at least I know it's not a bug, thanks

yyy33 avatar Dec 02 '22 13:12 yyy33