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.
This commit is contained in:
parent
fa6b058070
commit
ae2ce18fd6
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user