This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Starting web site updates


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]