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

[Web] Update modifier state when Meta key is seen as Process key #50779

Conversation

bleroux
Copy link
Contributor

@bleroux bleroux commented Feb 20, 2024

Description

On Web, browsers can emit key events with a logical key sets to Process when the physical key is MetaLeft. Because the modifier state is 0 despite Meta key being pressed this will trigger an assert.
This PR adds some logic for this specific case. Maybe a more slightly broader solution will be needed (using the same logic for all modifiers ?). I focused on MetaLeft because it was directly reported on flutter/flutter#141186.

Related Issue

Fixes flutter/flutter#141186.

Tests

Adds 1 test.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Feb 20, 2024
@bleroux bleroux changed the title [Web] Update key event when Meta key is seen as Process key [Web] Update modifier state when Meta key is seen as Process key Feb 20, 2024
Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Yeah I think for such a special corner case, this kind of logic is fine. We can find a more generalized solution if we run into more similar issues.

@bleroux bleroux added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 21, 2024
@auto-submit auto-submit bot merged commit 9100d32 into flutter:main Feb 21, 2024
28 checks passed
@bleroux bleroux deleted the web_update_key_event_when_MetaLeft_is_seen_as_Process branch February 21, 2024 05:37
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 21, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 21, 2024
…143820)

flutter/engine@efc6994...9100d32

2024-02-21 leroux_bruno@yahoo.fr [Web] Update modifier state when Meta key is seen as Process key (flutter/engine#50779)
2024-02-21 jason-simmons@users.noreply.github.com Add pub.dev to the hosted package URIs checked by the pub_get_offline script (flutter/engine#50811)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine
Projects
None yet
2 participants