Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1012)

Unified Diff: ui/events/test/event_generator.cc

Issue 1072193004: Take GetCharacterFromKeyCode() out behind the barn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/events/test/event_generator.cc
diff --git a/ui/events/test/event_generator.cc b/ui/events/test/event_generator.cc
index ae3bcb6d667a786c82a7e55a47d290835d3c1898..68650154b5b9e4659f27459cc4566640ca7bf400 100644
--- a/ui/events/test/event_generator.cc
+++ b/ui/events/test/event_generator.cc
@@ -540,7 +540,8 @@ void EventGenerator::DispatchKeyEvent(bool is_press,
int flags) {
#if defined(OS_WIN)
UINT key_press = WM_KEYDOWN;
- uint16 character = ui::GetCharacterFromKeyCode(key_code, flags);
+ uint16 character = ui::DomCodeToUsLayoutCharacter(
+ ui::UsLayoutKeyboardCodeToDomCode(key_code), flags);
Wez 2015/04/21 22:08:46 This changes the behaviour slightly - e.g. the top
kpschoedel 2015/04/21 22:36:38 GetCharacterFromKeyCode() was a hard-coded US layo
if (is_press && character) {
MSG native_event = { NULL, WM_KEYDOWN, key_code, 0 };
TestKeyEvent keyev(native_event, flags);

Powered by Google App Engine
This is Rietveld 408576698