Alexandre Julliard : wineandroid: Fix handling of Caps Lock with non-alphabetic keys.

Alexandre Julliard julliard at winehq.org
Mon Jun 26 15:17:52 CDT 2017


Module: wine
Branch: master
Commit: ab006d00854f694e63778ac891f9e19d13450c7a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ab006d00854f694e63778ac891f9e19d13450c7a

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jun 26 15:12:10 2017 +0200

wineandroid: Fix handling of Caps Lock with non-alphabetic keys.

Spotted by Dmitry Timoshkov.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wineandroid.drv/keyboard.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wineandroid.drv/keyboard.c b/dlls/wineandroid.drv/keyboard.c
index e6e1d02..3d459cd 100644
--- a/dlls/wineandroid.drv/keyboard.c
+++ b/dlls/wineandroid.drv/keyboard.c
@@ -757,7 +757,7 @@ INT CDECL ANDROID_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
                                LPWSTR buf, int size, UINT flags, HKL hkl )
 {
     WCHAR buffer[2];
-    BOOL shift = (state[VK_SHIFT] & 0x80) || (state[VK_CAPITAL] & 0x01);
+    BOOL shift = state[VK_SHIFT] & 0x80;
     BOOL ctrl = state[VK_CONTROL] & 0x80;
     BOOL numlock = state[VK_NUMLOCK] & 0x01;
 
@@ -798,7 +798,7 @@ INT CDECL ANDROID_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
             }
             if (virt >= 'A' && virt <= 'Z')
             {
-                buffer[0] = shift ? virt : virt + 'a' - 'A';
+                buffer[0] =  shift || (state[VK_CAPITAL] & 0x01) ? virt : virt + 'a' - 'A';
                 break;
             }
             if (virt >= VK_NUMPAD0 && virt <= VK_NUMPAD9 && numlock && !shift)




More information about the wine-cvs mailing list