http://bugs.winehq.org/show_bug.cgi?id=8854
--- Comment #51 from Vitaliy Margolen vitaliy@kievinfo.com 2010-02-09 19:33:34 --- (In reply to comment #50)
I suspect that won't work on Windows either.
Yes it will - dinput talks directly to kbd/mouse/joystick drivers. In fact this whole bug is exactly about these cases - when window is created in the different thread then the one asking and/or the thread that created window has no message loop at all or during the game play.
The only proper way to fix this is the same as fixing dinput mouse - use xi2 to get raw keyboard events from X.