Derek Lesho : users/tests: Test scan code prefix for MAPVK_VK_TO_VSC_EX.

Alexandre Julliard julliard at winehq.org
Mon Dec 2 17:10:14 CST 2019


Module: wine
Branch: master
Commit: 11ef39af39fef20032b08a09380c5a5ce30254e5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=11ef39af39fef20032b08a09380c5a5ce30254e5

Author: Derek Lesho <dlesho at codeweavers.com>
Date:   Tue Nov 12 14:50:19 2019 -0600

users/tests: Test scan code prefix for MAPVK_VK_TO_VSC_EX.

Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/tests/input.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index d0e7603811..ddaf7541e4 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -1873,6 +1873,16 @@ static void test_key_map(void)
                vkey, numpad_scan);
         }
     }
+
+    /* test the scan code prefixes of the right variant of a keys */
+    s = MapVirtualKeyExA(VK_RCONTROL, MAPVK_VK_TO_VSC, kl);
+    ok(s >> 8 == 0x00, "Scan code prefixes should not be returned when not using MAPVK_VK_TO_VSC_EX %#1x\n", s >> 8);
+    s = MapVirtualKeyExA(VK_RCONTROL, MAPVK_VK_TO_VSC_EX, kl);
+    ok(s >> 8 == 0xE0 || broken(s == 0), "Scan code prefix for VK_RCONTROL should be 0xE0 when MAPVK_VK_TO_VSC_EX is set, was %#1x\n", s >> 8);
+    s = MapVirtualKeyExA(VK_RMENU, MAPVK_VK_TO_VSC_EX, kl);
+    ok(s >> 8 == 0xE0 || broken(s == 0), "Scan code prefix for VK_RMENU should be 0xE0 when MAPVK_VK_TO_VSC_EX is set, was %#1x\n", s >> 8);
+    s = MapVirtualKeyExA(VK_RSHIFT, MAPVK_VK_TO_VSC_EX, kl);
+    ok(s >> 8 == 0x00 || broken(s == 0), "The scan code shouldn't have a prefix, got %#1x\n", s >> 8);
 }
 
 #define shift 1




More information about the wine-cvs mailing list