Commit ab006d00 authored by Alexandre Julliard's avatar Alexandre Julliard

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

Spotted by Dmitry Timoshkov. Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ae5ec5c5
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment