From ab006d00854f694e63778ac891f9e19d13450c7a Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 26 Jun 2017 15:12:10 +0200 Subject: [PATCH] wineandroid: Fix handling of Caps Lock with non-alphabetic keys. Spotted by Dmitry Timoshkov. Signed-off-by: Alexandre Julliard --- 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 e6e1d028706..3d459cd3c0a 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)