On 9/9/22 5:54 PM, James Richters via fpc-pascal wrote:
I have some key sequences with PTCCRT.READKEY  where I use a lower case
letter to do one thing and an uppercase to do another, but if the Capslock
is on, they do the wrong things.  Is there a way I can check the condition
of the shift key to see if shift was actually pressed instead of just going
by whether I got a capital letter or not?   The key input is not something
that is ever displayed on the screen, it's just making selections and doing
them.

looking at the list of constants in ptcpas, i find PTCKEY_SHIFT... i also find, in Classes, the IPTCKeyEvent which has a GetShift function as well as a Shift property... seems like you should be able to the shift status with something like

type myKeyEvent : IPTCKeyEvent;
type myShiftStatus : boolean;

myShiftStatus := myKeyEvent.Shift;


https://ptcpas.sourceforge.io/api-reference/ptc/iptckeyevent.html





NOTE: it has been way too long since i've actually written any pascal code... take the above with a grain of salt... i may have the syntax all wrong...


--
 NOTE: No off-list assistance is given without prior approval.
       *Please keep mailing list traffic on the list where it belongs!*
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to