Commit ae2ce18f authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Don't allow dead-key state to repeat after characters are generated.

It's fairly common in Mac keyboard layouts that, if you type a dead key twice, the second key press will both produce a non-dead character and also perpetuate the dead-key state. For example, with the U.S. layout, Option-E, E will produce "é" and Option-E, Option-E, E will produce "´é". Windows keyboard layouts don't tend to do this. The second key press produces the non-dead character and clears the dead-key state.
parent fa6b0580
......@@ -1394,7 +1394,10 @@ INT CDECL macdrv_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState
}
if (!is_menu)
{
thread_data->dead_key_state = deadKeyState;
if (keyAction != kUCKeyActionUp && len > 0 && deadKeyState == thread_data->dead_key_state)
thread_data->dead_key_state = 0;
else
thread_data->dead_key_state = deadKeyState;
if (keyAction == kUCKeyActionUp)
goto done;
......
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