From: Zhiyi Zhang zzhang@codeweavers.com
GetKeyboardLayout() is also tested manually on Windows 10 with Korean, Chinese, and Japanese IME activated. --- dlls/user32/tests/input.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 12fa459205a..5f68f34443a 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -5420,6 +5420,24 @@ static void test_input_desktop( char **argv ) ok_ret( 1, SetCursorPos( pos.x, pos.y ) ); }
+static void test_GetKeyboardLayout(void) +{ + LANGID lang_id; + BOOL is_cjk; + HKL hkl; + + /* Test that the high word of the keyboard layout in CJK locale on Vista+ is the same as the low + * word, even when IME is on */ + lang_id = PRIMARYLANGID(GetUserDefaultLCID()); + is_cjk = (lang_id == LANG_CHINESE || lang_id == LANG_JAPANESE || lang_id == LANG_KOREAN); + if (is_cjk && LOBYTE(LOWORD(GetVersion())) > 5) + { + hkl = GetKeyboardLayout(0); + todo_wine + ok(HIWORD(hkl) == LOWORD(hkl), "Got unexpected hkl %p.\n", hkl); + } +} + START_TEST(input) { char **argv; @@ -5465,6 +5483,7 @@ START_TEST(input) test_RegisterRawInputDevices(); test_rawinput(argv[0]); test_DefRawInputProc(); + test_GetKeyboardLayout();
if(pGetMouseMovePointsEx) test_GetMouseMovePointsEx( argv );