http://bugs.winehq.org/show_bug.cgi?id=5623
Summary: GetAsyncKeyState wrong if querying process doesn't have focus Product: Wine Version: CVS Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-x11driver AssignedTo: wine-bugs@winehq.org ReportedBy: tkho@ucla.edu
GetAsyncKeyState doesn't return the correct key state if the focused process is different from the process querying the key state. In Windows, the call works regardless of focused process.
GetAsyncKeyState does a lookup in the global key_state_table in winex11.drv/keyboard.c, and each process gets a separate instance of this table.
http://msdn2.microsoft.com/en-us/library/h90dkhs0.aspx gives two ways to implement shared data, while vitamin on IRC mentioned this might belong in SharedUserData.