This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[Lixux] fix pressing Shift+AltLeft throws#37079
Merged
auto-submit[bot] merged 1 commit intoflutter:mainfrom Oct 29, 2022
Merged
[Lixux] fix pressing Shift+AltLeft throws#37079auto-submit[bot] merged 1 commit intoflutter:mainfrom
auto-submit[bot] merged 1 commit intoflutter:mainfrom
Conversation
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 29, 2022
schwa423
pushed a commit
to schwa423/engine
that referenced
this pull request
Nov 16, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a check to avoid Shift + AltLeft throwing an exception on Linux.
The issue occurs because Shift + AltLeft is usually configured to be MetaLeft key.
The exception is thrown because the GDK event received by the engine code has its keyval pointing to MetaLeft but its keycode pointing to either Shift or Alt (depending on which was last pressed). As engine code use keycode to lookup the physical key and keyval to lookup the logical key, this results in a FlutterKeyEvent with a mismatch between logical and physical keys which leads to wrong key event being sent.
Implementation
The fix here relies on two steps:
Related Issue
Fixes flutter/flutter#96082
Tests
Adds 1 tests