Einzelnen Beitrag anzeigen

Delphi.Narium

Registriert seit: 27. Nov 2017
2.508 Beiträge
 
Delphi 7 Professional
 
#2

AW: TMainmenu Shortcuts auf MacOS

  Alt 9. Nov 2021, 20:47
Hilft das Representing Keys and Shortcuts?
Zitat von Representing Modifier Keys:
Most computers running Windows do not have a CMD key, just as most computers running macOS do not have a CTRL key. Mind this when you configure the shortcuts of your application. You may need to define your shortcuts at run time and use conditional compilation to set the right shortcut for each platform. For example:
Delphi-Quellcode:
{$IF defined(MSWINDOWS)}
    MenuItem1.ShortCut := TextToShortCut('Ctrl+N');
{$ELSEIF defined(MACOS) and not defined(IOS)}
    MenuItem1.ShortCut := TextToShortCut('Cmd+N');
{$ENDIF}
  Mit Zitat antworten Zitat