[Lazarus] how to handle Shift=[ssCtrl]
JuuS
JuuS at mykolab.ch
Thu Apr 2 18:41:31 CEST 2015
On 04/02/2015 04:33 PM, FreeMan wrote:
> Thank you Graeme,
> Yes your code is working and hold ssShift, just change ssShift to
> ssCtrl, and not work, I mean not show any message. What is your test
> system ? I wrote in first message, yosemite qt x64.
Not sure if anyone already mentioned this but is the form's KeyPreview
property set to true?
>
> if (Shift*[ssShift,ssAlt,ssCtrl]) = [ssCtrl] then
> ShowMessage('really, only Ctrl was pressed');
> if Shift * [ssShift,ssAlt,ssCtrl] = [ssShift,ssCtrl] then
> ShowMessage('Only Shift+Ctrl was pressed');
> if ssCtrl in Shift then
> ShowMessage('Shift could have been pressed with ssctrl for
> example');
>
>
>
> On 2.04.2015 15:39, Graeme Geldenhuys wrote:
>> if (Shift*[ssShift,ssAlt,ssCtrl]) = [ssShift] then
>> ShowMessage('really, only Shift was pressed');
>> if Shift * [ssShift,ssAlt,ssCtrl] = [ssShift,ssCtrl] then
>> ShowMessage('Only Shift+Ctrl was pressed');
>> if ssShift in Shift then
>> ShowMessage('Shift could have been pressed with ssAlt for example');
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
More information about the Lazarus
mailing list