mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-15 08:23:37 +01:00
Fix 'Window' key is treated as 'unknown' in Firefox (#175739)
This commit is contained in:
@@ -34,9 +34,7 @@ function extractKeyCode(e: KeyboardEvent): KeyCode {
|
||||
if (platform.isMacintosh) { return KeyCode.Meta; }
|
||||
}
|
||||
} else if (browser.isWebKit) {
|
||||
if (keyCode === 91) {
|
||||
return KeyCode.Meta;
|
||||
} else if (platform.isMacintosh && keyCode === 93) {
|
||||
if (platform.isMacintosh && keyCode === 93) {
|
||||
// the two meta keys in the Mac have different key codes (91 and 93)
|
||||
return KeyCode.Meta;
|
||||
} else if (!platform.isMacintosh && keyCode === 92) {
|
||||
|
||||
@@ -648,7 +648,7 @@ for (let i = 0; i <= KeyCode.MAX_VALUE; i++) {
|
||||
[5, 1, ScanCode.None, empty, KeyCode.Ctrl, 'Ctrl', 17, 'VK_CONTROL', empty, empty],
|
||||
[4, 1, ScanCode.None, empty, KeyCode.Shift, 'Shift', 16, 'VK_SHIFT', empty, empty],
|
||||
[6, 1, ScanCode.None, empty, KeyCode.Alt, 'Alt', 18, 'VK_MENU', empty, empty],
|
||||
[57, 1, ScanCode.None, empty, KeyCode.Meta, 'Meta', 0, 'VK_COMMAND', empty, empty],
|
||||
[57, 1, ScanCode.None, empty, KeyCode.Meta, 'Meta', 91, 'VK_COMMAND', empty, empty],
|
||||
[5, 1, ScanCode.ControlLeft, 'ControlLeft', KeyCode.Ctrl, empty, 0, 'VK_LCONTROL', empty, empty],
|
||||
[4, 1, ScanCode.ShiftLeft, 'ShiftLeft', KeyCode.Shift, empty, 0, 'VK_LSHIFT', empty, empty],
|
||||
[6, 1, ScanCode.AltLeft, 'AltLeft', KeyCode.Alt, empty, 0, 'VK_LMENU', empty, empty],
|
||||
|
||||
Reference in New Issue
Block a user