Commit 6047562c authored by mharanczyk's avatar mharanczyk Committed by Commit bot

Change VKEY_MENU to VKEY_LMENU in interactive ui tests key sequence sending.

On windows depending on system/keyboard setting right alt (alt gr) can be
seen as alt+ctrl. This is also true for sending VKEY_MENU via SendInput,
probably because it is treated as any alt key. To avoid intorducing
unwanted ctrl key in sequence use VKEY_LMENU which will only add alt key
without a risk of adding ctrl key regardless of system setup.
The change fixes CommandsApiTest.DontOverwriteSystemShortcuts test timout.
Test expected alt+shift+f, but what was received was ctrl+alt+shift+f.

BUG=409567

Review URL: https://codereview.chromium.org/526063002

Cr-Commit-Position: refs/heads/master@{#293112}
parent 0b147e5f
......@@ -215,7 +215,7 @@ bool SendKeyPressImpl(HWND window,
}
if (alt) {
if (!FillKeyboardInput(ui::VKEY_MENU, &input[i], false))
if (!FillKeyboardInput(ui::VKEY_LMENU, &input[i], false))
return false;
i++;
}
......@@ -229,7 +229,7 @@ bool SendKeyPressImpl(HWND window,
i++;
if (alt) {
if (!FillKeyboardInput(ui::VKEY_MENU, &input[i], true))
if (!FillKeyboardInput(ui::VKEY_LMENU, &input[i], true))
return false;
i++;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment