Ctrl-[Char] and Ctrl+[Char] ?

I use on the macOS application a keyboard shortcut that is ctrl-d (and some others like ctrl-e).

I noticed yesterday that these does not works when running on Windows (10).

Beside setting the keyboard shortcut for Windows in the App.Open Event, how can I set “Once for XPlatforms” a keyboard shortcut ?

In the Menu Editor, there is a zone called Platform Specific Shortcut:


MacControlKey --> this is the one I use.


Ideas ?

The reality is that the Command Key is the key for Menu shortcuts on the Mac, whereas it’s the Control key on Windows. Shortcuts that use just the Control key on Mac are very rare in cross platform apps for this reason.

I suspect that Control D is reserved by the platform for Duplicate or Delete.

Note that you can also use Opt (Mac) or Alt (Windows, Linux) for alternate ops, like Command-Option-D or Control-Alt-D

To do this, Use a constant with different values for each platform.

Cocoa = cmd+E
Windows = ctrl+E
Linux = ctrl+E

And then set the shortcut key using the constant. Those works both in the ide editor and in code.

Hi Greg,

thank you for your kind answer.

In the mean time, I added in the App.Open Event some lines to set the Keyboard Shortcut to Ctrl+D, Ctrl+E, etc.

I build the exe, copy it in a MemoryStick and fire it under Windows. This worked.

I cannot do any intensive debug on Windows right now, but I will do later to confirm I do not try to steal an OS Keyboard Shortcut with Ctrl+D or Ctrl+E or any other Keyboard Shortcut.

BTW: since I use Xojo 2015r1, before making a report, I check firing the current Xojo (actually 2016r4.1) before making a report, even if this takes my time; I totally dislike erroneous reports (even when it appears correct to me).

My problem is that I have trouble not following the documentation. I never had the idea to click in the Windows icon (until minutes ago) when I am in the MenuEditor (on macOS) and click in the Properties pane to watch eventual changes (for example). A click in MacOptionKey AND PCAltKey shows the MenuBar / MenuItems on PC… Niiice !