This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[Lixux] fix pressing Shift+AltLeft throws #37079
Merged
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