-
Greg Spencer authored
## Description Adds some convenience methods to `KeyEvent` that allow testing to see if a logical or physical key is pressed from the event object. These are similar to the ones already on `RawKeyEvent`, and will make migration the to `KeyEvent` easier (so it could more easily be a `flutter fix` migration). Added: - `bool isLogicalKeyPressed(LogicalKeyboardKey key)` - `bool isPhysicalKeyPressed(PhysicalKeyboardKey key)` - `bool get isControlPressed` - `bool get isShiftPressed` - `bool get isAltPressed` - `bool get isMetaPressed` ## Related Issues - https://github.com/flutter/flutter/issues/136419 ## Tests - Added tests for the new methods.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| lib | ||
| test | ||
| test_fixes | ||
| test_private | ||
| test_profile | ||
| test_release | ||
| LICENSE | ||
| README.md | ||
| analysis_options.yaml | ||
| build.yaml | ||
| dart_test.yaml | ||
| pubspec.yaml |