Starting web site updates
Harold Hunt
huntharo@msu.edu
Thu Apr 12 08:05:00 GMT 2001
Alexander,
> I tried getting the AltGr keystate via GetAsyncKeyState when
> processing
> the Control_L press. Was there any problem with it?
GetAsyncKeyState isn't appropriate because it gets the key state at the time
of the function call; that seems like a fine idea until you consider that
you may be processing the Control_L message several milliseconds to several
seconds after the key was actually pressed; in that amount of time the Alt_R
key may be released if it was pressed, or pressed if it was released.
GetKeyState gets the state of a key at the time that the current message was
generated; thus, you'll always get the correct state for the Alt_R key when
processing the Control_L message.
> This might break some older applications which use the
> keyboard modifiers
> even as mouse modifier. I believe some window managers use
> this. Even KDE
> uses it (Pressing Control when selecting another icon adds it
> to the selection
> list).
That is good to know.
I think we both realize that this is not trivial, but it is solveable. :)
Harold
More information about the Cygwin-xfree
mailing list