-
Notifications
You must be signed in to change notification settings - Fork 123
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
Update Unshaky/ShakyPressPreventer.m #18
Conversation
This is great, finally an answer to this long-lived issue #1. In this PR, you prevent Unshaky from dismissing the event when Image this scenario:
I would suggest: If the first and second have different masks, disable Unshaky. Otherwise, let it function as normal. What do you think? |
Your PR is great, but I cannot merge it right now, since it contains changes not strictly relevant to this topic (some refactoring is really nice), and also the code style is not consistent with what we have right now (e.g. |
Can you try this one in |
Sorry, this is actually my first time contributing to a GitHub project. |
Oh, nevermind, I see the edits now. I'll try it on my computer. |
Totally agree, these are nice changes and they should go into this repo. Since your single commit contains several independent changes, I cannot pick which one to adopt. I made one implementation on
|
Really appreciate your suggestion. The latest two commits here are about your refactoring suggestion. https://github.com/aahung/Unshaky/commits/dev feel free to refactor more if you want to. Thanks! |
Hmm... Your version seems to cover the scenario you mentioned (simulated by setting V key to 200 ms and rapidly hitting CMD+v), but they don't seem to fix the CMD+space issue. The weird thing is that the double event only seems to happen with CMD+space key, not with CMD+(anything else), or (any other modifier key)+space. It must be tied to the spotlight shortcut somehow. It also looks like it won't work to cover the scenario you mentioned as well as this issue with the same code, because it appears critical to NOT dimiss the 2nd (duplicate) event generated by CMD+space, but it will get dismissed with the current version because its flags don't match the previous event. This is what my modified log looks like with the current version during a CMD+space (with the keyboard not causing any problems itself, but the spotlight issue present):
And this is what it looks like when it's working (with my earlier code):
|
It looks like my initial comment wasn't quite right when I wrote:
Your most recent edit would work if that was the case.
And like this if the space bar is released first (which won't work with the current version):
|
More targeted approach to CMD+space problem after learning more. Also wrote up findings in comment.
I submitted a new pull request that's just like my earlier one, except it only modifies normal operation for the case of CMD+space.
|
Closed due to a newer PR #19 |
Hi, this appears to fix the issue with the command key.
Thanks a ton for creating this by the way.
I was going nuts with a double space-bar problem.