uidirve/js: Bug fix: Fix key codes for Edge browser

Updates #1382
This commit is contained in:
Hajime Hoshi 2020-10-11 19:03:08 +09:00
parent 5ee3fdf628
commit 3c21246db5
2 changed files with 3 additions and 3 deletions

View File

@ -338,8 +338,8 @@ func init() {
0x13: "Pause",
0x91: "ScrollLock",
0x5d: "Menu",
0x5b: "LeftSuper", // "OSLeft" for macOS 10.10 or newer
0xe0: "LeftSuper", // "DOM_VK_META" for macOS 10.9 or older
0x5b: "LeftSuper",
0x5c: "RightSuper",
// On Edge, this key does not work. PrintScreen works only on keyup event.
// 0x2C: "PrintScreen",

View File

@ -186,6 +186,7 @@ var edgeKeyCodeToDriverKey = map[int]driver.Key{
89: driver.KeyY,
90: driver.KeyZ,
91: driver.KeyLeftSuper,
92: driver.KeyRightSuper,
93: driver.KeyMenu,
96: driver.KeyKP0,
97: driver.KeyKP1,
@ -227,5 +228,4 @@ var edgeKeyCodeToDriverKey = map[int]driver.Key{
220: driver.KeyBackslash,
221: driver.KeyRightBracket,
222: driver.KeyApostrophe,
224: driver.KeyLeftSuper,
}