Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering sometimes doesn't work #182

Open
sky417 opened this issue Sep 13, 2021 · 1 comment
Open

Filtering sometimes doesn't work #182

sky417 opened this issue Sep 13, 2021 · 1 comment

Comments

@sky417
Copy link

sky417 commented Sep 13, 2021

On macOS 11.5.2, unshaky 0.7.0.

Currently I have 55ms for global setting and 130ms for Space.

For some reason, the chattering doesn't get filtered for unknown reason. Here's a couple of samples:

1631548154.279290 Key( 40| 49|         Space|         0|130) E(10)
1631548154.396071 Key( 40| 49|         Space|         0|130) E(11)
1631548154.401034 Key( 40| 49|         Space|         0|130) E(10)
1631548154.404899 Key( 40| 49|         Space|         0|130) E(11)

The delta from keyup to keydown was only ~5ms, yet still registered.

1631548383.173862 Key( 40| 49|         Space|         0|130) E(10)
1631548383.231955 Key( 40| 14|             E|         0| 55) E(11)
1631548383.274003 Key( 40| 49|         Space|         0|130) E(11)
1631548383.278947 Key( 40| 49|         Space|         0|130) E(10)
1631548383.279698 Key( 40| 49|         Space|         0|130) E(11)

The delta here was about 4.9ms, and registered.

Working log:

1631548512.333682 Key( 40| 49|         Space|         0|130) E(11)
1631548512.342858 Key( 40| 49|         Space|         0|130) E(10) DISMISSED
1631548512.342986 Key( 40| 49|         Space|         0|130) E(11) DISMISSED

Worked fine in this case, ~9ms delta.

Is there any known issue ?

@aahung
Copy link
Owner

aahung commented Sep 28, 2021

@sky417 this is pretty strange. From the log, my guess is it is somehow triggers the special logic:

I cannot remember too much details. Will try to re-visit this when I have time

/** @ghost711: CMD+Space was pressed, which causes a duplicate pair of down/up
keyEvents to occur 1-5 msecs after the "real" pair of events.
- If the CMD key is released first, it will look like:
CMD+Space Down
Space Up
CMD+Space Down
CMD+Space Up
- Whereas if the space bar is released first, it will be:
CMD+Space Down
CMD+Space Up
CMD+Space Down
CMD+Space Up
- The issue only appears to happen with CMD+Space,
not CMD+<any other key>, or <any other modifier key>+Space.*/
// So here we allow one double-press to slip away

// let it slip away if allowance is 1 for CMD+SPACE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants