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
[Web]: Command and shift keys on MacOS causes other keys to stay pressed for about 1 second #97589
Comments
|
Thanks for the report. I verified this behavior using latest stable and master and ran it on web using Mac machine and do see the same behavior as reported, ie, there's a delay of about 1 second when key press is released. This is more evident using console log showing key press eventsI tried the same scenario on macOS (desktop) but didn't see the same behavior / delay, so this could be specific to web. master stable flutter doctor -v |
|
I think this is because certain shortcuts on the web cause some control keys to never issue an "up" event, so we have to time out ourselves. |
|
That looks about right. It seems like macOS never fires an "up" event for the final key in Cmd+Shift+{key}. For example, when I use https://unixpapa.com/js/testkey.html in macOS + Chrome, with Cmd+Shift+A, I see the output: The reason I found this issue is because I was using the It would seem that since macOS doesn't fire an up-event for the final key in a Cmd+Shift+{key} set, this issue as it stands is not actionable. Should I file an issue for |
|
Is this fixed with flutter/engine#30488? cc @dkwingsmt |
|
@vogtb Thanks for such detailed explanation! This is an intended behavior, but should not necessarily cause shortcuts on macOS Web unusable. Your problem is probably due to using
Can you check if this problem no longer appears if you switch to using |
|
Heck yeah, that works! Thanks @dkwingsmt, keep up the good work, love working with Flutter 👍 |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
tldr; triggering Command + Shift + {key} causes the final {key} to "stay pressed" (or rather causes the KeyUpEvent to be delayed) by 1 second.
related: #75934
Steps to Reproduce (for Flutter Web on MacOS):
Use the main.dart file below
You'll notice that there is 1.006 seconds between when the A key was pressed down, and when the release was released.
You can further reproduce the issue here:
You'll notice that, again, the final A key-down event is triggered 1.005 seconds after it was pressed down.
This can be reproduced with the keys: A, =, +, X, Y, J, and so on.
To be clear, my expectation is that the key events should be trigger in the order that they occur, and the final "A" key does not stay down for a second after it was pressed.
Output of flutter doctor:
The text was updated successfully, but these errors were encountered: