Malcom,
        Not sure exactly what you mean, but my original code was merely:

If GetAsynchKeyState(VK_SHIFT) > 0 then
Begin

Else

End;

        As Rob explained I should have been using GetKeyState instead and
indeed that did the trick.  In this newer problem however I'm attempting to
give commands to a TListview in it's OnKeyDown event.  And using two
keys...a Shift key and either a single letter or a Function key.  The extra
bit of code added "and $80)> 0" to "if (key=VK_F1) and
    ((Windows.GetKeyState(VK_SHIFT) and $80)>0)" necessary to make it work
is what I don't understand.  

from Robert Meek dba Tangentals Design  CCopyright 2006

"When I examine myself and my methods of thought, I come to the conclusion
that the gift of Fantasy has meant more to me then my talent for absorbing
positive knowledge!"
                                                    Albert Einstein


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of [EMAIL PROTECTED]
Sent: Tuesday, April 25, 2006 5:23 AM
To: Borland's Delphi Discussion List
Subject: Re: RE: Virtual key codes

> How exactly does this part work?  You say it masks out the
> other
> bits in the byte returned by GetKeyState, but why is that
> necessary in this
> example when it wasn't in the other I mentioned earlier
> where I had
> originally been using GetAsynchKeyState?  That now works
> perfectly without
> having to mask out the other bits.
I don't have your previous code on hand. Could be you're using a Jedi
wrapper that returns a boolean? If you post the code the code again we could
discuss it...

-malcolm
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to