<p style="padding:0 0 0 0; margin:0 0 0 0;">Hi,</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">You must use:</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">if ssCtrl in Shift then ...</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">instead.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">That's because mouse-buttons are in Shift too. If you do Ctrl+right-click, then Shift=[ssRight, ssCtrl]. And possibly something else (ssCaps).</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">V.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">______________________________________________________________<br />
> Od: FreeMan <freeman35@delphiturkiye.com><br />
> Komu: Lazarus mail list <Lazarus@lists.lazarus.freepascal.org><br />
> Datum: 02.04.2015 13:37<br />
> Předmět: [Lazarus] how to handle Shift=[ssCtrl]<br />
></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">fpc r30400 lazarus r48585 yosemite qt x64<br />
<br />
procedure TFRM_.TLabel1_MouseUp(Sender: TObject; Button: TMouseButton; <br />
Shift: TShiftState; X , Y: Integer);<br />
begin<br />
if(Button=mbRight)then begin<br />
if Shift=[ssCtrl] then begin<br />
ShowMessage('ctrl key pressed :');<br />
end;<br />
end;<br />
end;<br />
<br />
while debuging, move mouse on "Shift" and hint show values is 128, <br />
ssCtrl values is SSCTRL. and its not aqual, I mean I can not handle ctrl <br />
+ right click on Tlabel.<br />
command key = 4<br />
ssctrl =128<br />
ssAlt = 2<br />
ssShift = 1<br />
ssctrl + ssAlt = 130<br />
some shift values from hint<br />
<br />
--<br />
_______________________________________________<br />
Lazarus mailing list<br />
Lazarus@lists.lazarus.freepascal.org<br />
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a></p>