I am developing a Delphi application.
On TImage.MouseDown event I want to do X task if shift key is pressed, Y task if control key is pressed and Z task if any of them is not pressed. For that I am using TShiftState variable. Now I have a function in which I have to pass this variable as parameter.
procedure Something(keyState : TShiftState);
Now In this function what I should right to check the state of key?
if KeyState <> ssShift then begin
end;
The above code shows error.
Thanks.
IIUC you want the empty set
[]:Regarding your update:
If you are only interested in ssShift and ssCtrl, and the other values (ssAlt, ssLeft, …) don’t matter, you can mask the latter ones out: