user32: Translate missing vkeys in ToUnicodeEx.

As shown by user32 input and msg tests.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-04-29 09:53:54 +02:00 committed by Alexandre Julliard
parent 37db87eff6
commit fde6c6119d
1 changed files with 3 additions and 0 deletions

View File

@ -898,6 +898,7 @@ INT WINAPI ToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
/* FIXME: English keyboard layout specific */
if (scan & 0x8000) buffer[0] = 0; /* key up */
else if (virt == VK_ESCAPE) buffer[0] = VK_ESCAPE;
else if (!ctrl)
{
switch (virt)
@ -943,6 +944,8 @@ INT WINAPI ToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
case VK_OEM_5: buffer[0] = 0x1c; break;
case VK_OEM_6: buffer[0] = 0x1d; break;
case VK_SUBTRACT: buffer[0] = 0x1e; break;
case VK_RETURN: buffer[0] = shift ? 0 : '\n'; break;
case VK_SPACE: buffer[0] = ' '; break;
default:
if (virt >= 'A' && virt <= 'Z') buffer[0] = virt - 'A' + 1;
else buffer[0] = 0;