[Lazarus] KeyDown and value of Shift on Mac (Darwin)

Torsten Bonde Christiansen tc at epidata.dk
Fri Sep 2 11:26:49 CEST 2011


On 2011-09-01 15:46, Bart wrote:
> Hi,
>
> A question on KeyDown on Mac:
>
> procedure TSomeEditControl.KeyDown(var Key: Word; Shift: TShiftState);
> begin
>    if (Key = VK_SomeKey) and (Shift = [ssCtrl]) then
>    begin// Ctrl+SomeKey
>      DoSomething;
>      Key := 0;
>    end;
> end;
>
> This will do fine on PC's and I thought it would work with Cmd+SomeKey
> on Mac, but is this really the case?
> (Actually SomeKey is VK_C, VK_V or VK_X in this case.
I use *ssMeta* for using the Cmd key on a MAC. I think most modern MAC 
actually have a Ctrl key as well as the Cmd key.

Kind regards
Torsten Bonde Christiansen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110902/80e2f3c3/attachment-0003.html>


More information about the Lazarus mailing list