[Keyboard, Web] Map from "Esc" to the Escape key (#106133)

* Impl

* Fix build

* Add test
This commit is contained in:
Tong Mu
2022-06-21 13:27:12 -07:00
committed by GitHub
parent df55dbb9d9
commit 0ac05f1c5c
13 changed files with 125 additions and 51 deletions

View File

@@ -303,7 +303,7 @@ class KeyboardMapsCodeGenerator extends BaseCodeGenerator {
/// This generates the map of Web KeyboardEvent codes to physical keys.
String get _webPhysicalKeyMap {
final OutputLines<String> lines = OutputLines<String>('Web physical key map');
final OutputLines<String> lines = OutputLines<String>('Web physical key map', behavior: DeduplicateBehavior.kKeep);
for (final PhysicalKeyEntry entry in keyData.entries) {
for (final String webCodes in entry.webCodes()) {
lines.add(entry.name, " '$webCodes': PhysicalKeyboardKey.${entry.constantName},");