Wie erhalte ich aktuelle Modifikatorstatus mit FireMonkey unter OSX?

MitDelphi Für Windows verwende ich normalerweise diesen Code:

function isCtrlDown : Boolean;
var
  ksCurrent : TKeyboardState;
begin
  GetKeyboardState(ksCurrent);
  Result := ((ksCurrent[VK_CONTROL] and 128) <> 0);
end;

Wie kann ich dies mit FireMonkey unter Mac OS X erreichen?

ich habe gefundendiese, aber ich weiß nicht, wie ich es mit FireMonkey / Delphi (das verwendet, ...) verwalten soll:

void PlatformKeyboardEvent::getCurrentModifierState(bool& shiftKey, bool& ctrlKey, bool& altKey, bool& metaKey)
{
    UInt32 currentModifiers = GetCurrentKeyModifiers();
    shiftKey = currentModifiers & ::shiftKey;
    ctrlKey = currentModifiers & ::controlKey;
    altKey = currentModifiers & ::optionKey;
    metaKey = currentModifiers & ::cmdKey;
}

Ich recherchiere noch ... Im Moment habe ich dieses Gerät mit gefundenSchlüsselereignisse Zeug...unit Macapi.AppKit;

Antworten auf die Frage(2)

Ihre Antwort auf die Frage