[PATCH 2/3] winex11.drv: set global key state

Vitaliy Margolen wine-devel at kievinfo.com
Tue Aug 17 21:05:59 CDT 2010

On 08/16/2010 01:06 PM, Rafał Miłecki wrote:
> It's prehistoric thread already, but issue still isn't solved. I
> wanted to rework that old patch but I noticed set_key_state was
> already changed and it doesn't change single key state, but instead
> sets whole array at every call.
> This was I can not use set_key_state handler to update my
> "global_keystate" array, as I have no idea which key actually has been
> changed.
> Do you see some nice solution for this problem?

You can send the whole array (256 bytes isn't all that much, but on every 
key event - an overkill).
Or you can send changes only all at once (comparing arrays isn't all that hard).
Lastly you can use Xi2 to receive all key changes, however this won't pick 
up any injected key events (this is how it works in Wine anyway, so not a 
big loss of functionality).


More information about the wine-devel mailing list