Re: [fpc-pascal] Getting Shift key with PTCCRT

2022-09-18 Thread James Richters via fpc-pascal
I came up with a solution for this. Since I am on windows, I found I can just check GetAsyncKeyState between keypressed and readkey like this: If PTCCRT.KeyPressed then Begin isShiftDown := GetAsyncKeyState(VK_Shift); MyKey:=PTCCRT.ReadKey;

Re: [fpc-pascal] Getting Shift key with PTCCRT

2022-09-12 Thread Tomas Hajny via fpc-pascal
On 2022-09-12 21:41, Nikolay Nikolov via fpc-pascal wrote: On 9/10/22 17:57, James Richters via fpc-pascal wrote: Thanks for the suggestion I think the syntax should be: type myKeyEvent = IPTCKeyEvent; Var myShiftStatus : boolean; myShiftStatus := myKeyEvent.Shift; but I get IPTCKeyEvent not

Re: [fpc-pascal] Getting Shift key with PTCCRT

2022-09-12 Thread Nikolay Nikolov via fpc-pascal
On 9/10/22 17:57, James Richters via fpc-pascal wrote: Thanks for the suggestion I think the syntax should be: type myKeyEvent = IPTCKeyEvent; Var myShiftStatus : boolean; myShiftStatus := myKeyEvent.Shift; but I get IPTCKeyEvent not found. I wonder if it's only designated as internal.. or

Re: [fpc-pascal] Getting Shift key with PTCCRT

2022-09-11 Thread wkitty42--- via fpc-pascal
On 9/10/22 10:57 AM, James Richters wrote: Thanks for the suggestion I think the syntax should be: type myKeyEvent = IPTCKeyEvent; Var myShiftStatus : boolean; myShiftStatus := myKeyEvent.Shift; i told you i probably had the syntax wrong :lol: but I get IPTCKeyEvent not found. I wonder if

Re: [fpc-pascal] Getting Shift key with PTCCRT

2022-09-10 Thread James Richters via fpc-pascal
Thanks for the suggestion I think the syntax should be: type myKeyEvent = IPTCKeyEvent; Var myShiftStatus : boolean; myShiftStatus := myKeyEvent.Shift; but I get IPTCKeyEvent not found. I wonder if it's only designated as internal.. or if I need to use something other than PTCGraph and PTCCRT

Re: [fpc-pascal] Getting Shift key with PTCCRT

2022-09-10 Thread wkitty42--- via fpc-pascal
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

[fpc-pascal] Getting Shift key with PTCCRT

2022-09-09 Thread James Richters via fpc-pascal
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