[Keyboard, Web] Map from "Esc" to the Escape key (#106133)
* Impl * Fix build * Add test
This commit is contained in:
@@ -1552,7 +1552,8 @@
|
||||
"value": 4294967323,
|
||||
"names": {
|
||||
"web": [
|
||||
"Escape"
|
||||
"Escape",
|
||||
"Esc"
|
||||
],
|
||||
"macos": [
|
||||
"Escape"
|
||||
|
||||
@@ -1192,6 +1192,9 @@
|
||||
"name": "Escape",
|
||||
"chromium": "Escape"
|
||||
},
|
||||
"otherWebCodes": [
|
||||
"Esc"
|
||||
],
|
||||
"scanCodes": {
|
||||
"android": [
|
||||
1
|
||||
|
||||
@@ -50,6 +50,11 @@
|
||||
DOM_CODE(0x05ff1e, 0x0000, 0x0000, 0x0000, 0xffff, "GameButtonY", BUTTON_Y),
|
||||
DOM_CODE(0x05ff1f, 0x0000, 0x0000, 0x0000, 0xffff, "GameButtonZ", BUTTON_Z),
|
||||
|
||||
// Sometimes the Escape key produces "Esc" instead of "Escape". This includes
|
||||
// older IE and Firefox browsers, and the current Cobalt browser.
|
||||
// See: https://github.com/flutter/flutter/issues/106062
|
||||
DOM_CODE(0x070029, 0x0000, 0x0000, 0x0000, 0xffff, "Esc", ESCAPE),
|
||||
|
||||
// ============================================================
|
||||
// Fn key for Mac
|
||||
// ============================================================
|
||||
@@ -58,4 +63,4 @@
|
||||
// defined on other platforms. Chromium does define an "Fn" row, but doesn't
|
||||
// give it a Mac keycode. This overrides their definition.
|
||||
// USB HID evdev XKB Win Mac DOMKey Code
|
||||
DOM_CODE(0x000012, 0x0000, 0x0000, 0x0000, 0x003f, "Fn", FN),
|
||||
DOM_CODE(0x000012, 0x0000, 0x0000, 0x0000, 0x003f, "Fn", FN),
|
||||
|
||||
@@ -76,6 +76,16 @@
|
||||
DOM_KEY_UNI("Tilde", TILDE, '~'),
|
||||
DOM_KEY_UNI("Bar", BAR, '|'),
|
||||
|
||||
// ============================================================
|
||||
// Unprintable keys (Unicode plane)
|
||||
// ============================================================
|
||||
|
||||
// Key Enum Value
|
||||
// Sometimes the Escape key produces "Esc" instead of "Escape". This includes
|
||||
// older IE and Firefox browsers, and the current Cobalt browser.
|
||||
// See: https://github.com/flutter/flutter/issues/106062
|
||||
DOM_KEY_MAP("Esc", ESC, 0x1B),
|
||||
|
||||
// The following keys reside in the Flutter plane (0x0100000000).
|
||||
|
||||
// ============================================================
|
||||
|
||||
Reference in New Issue
Block a user