http://bugs.winehq.org/show_bug.cgi?id=5623
--- Comment #15 from Rafa³ Mi³ecki zajec5@gmail.com 2008-05-06 14:40:53 --- I have some tip for interested developer. This is how I see this problem, please note I may be wrong at some point. I try to make fixing this bug as simply as possible. Unfortunately I still can not do it myself.
Function GetAsyncKeyState can be found in dlls/user32/input.c and is quite trivial: SHORT WINAPI GetAsyncKeyState(INT nKey) { return USER_Driver->pGetAsyncKeyState( nKey ); }
More interesting place for us is dlls/winex11.drv/keyboard.c where we can find theses two interesting functions: KEYBOARD_UpdateOneState ( WORD vkey, WORD scan, int state, DWORD time ) X11DRV_GetAsyncKeyState(INT key)
We need to add variable very similar (100% simialar?) to key_state_table variable into wineserver. That will be variable shared between all the processes runned on the same wineserver. I think name like async_key_state_table would be nice.
Then we have to add changing async_key_state_table in KEYBOARD_UpdateOneState body. After that the last thing should be changing X11DRV_GetAsyncKeyState body to make this function use async_key_state_table instead of key_state_table.