Race condition in keyboard code?

Dmitry Timoshkov dmitry at codeweavers.com
Fri Mar 24 08:53:21 CST 2006

"Peter Åstrand" <astrand at cendio.se> wrote:

> What about using the thread_input->keystate, just as for Shift, Control,
> and NumLock?
> ToUnicodeEx does have a lpKeyState argument, so to me, it seems very wrong
> that a static, global variable is needed as well.

I don't see how a thread local keystate would solve a problem with 2 repetitive
KeyPress events you reported initially as being the source of the problem.

> The current implementation has another drawback: AltGr key presses never
> reaches the applications. In Windows, applications recieves VK_CONTROL,
> VK_MENU when AltGr is pressed.

Feel free to investigate it.


More information about the wine-devel mailing list