I had limited time yesterday to test a project on Windows and fount that none of the (tested) menu item shotcuts worked.
By worked I meant pressing ctrl+shift+i and getting its associated action like what I have on OS X.
When I added these MenuItems, I only typed their name and keyboard shortcut character (UPPERCASE) + check a CheckBox (to add Shift).
I may have forgot something obvious, but what ?
(It may be time for me to add entries to a project I have I can name it Reminder: a simple project with usefull info in a window: choose an entry and get the usefull styled text with images ).
In Windows, without any special coding, the system will automatically drop down the menu that starts with a letter.
For instance, Alt-F opens the File menu, Alt-E Edit and so on. That can be changed by the choice of the letter that triggers the drop down. For instance, as default, the File menu is entitled &File (it would work just as fine with title File and no ‘&’). But if you change that to F&ile, then Alt-i will open File.
Once a menu is dropped down, the first letter of an option activates it, unless another menu shortcut has been defined. For instance, if I create a File menuItem with title “Toto”, once the menu File is displayed, if I type T, that will activate Toto. But if I title it T&oto, then pressing o will activate it. So I can access it with Alt-F followed by o.
Menu options keyboard shortcuts are most often Ctrl-letter, just like Cmd-Letter in Mac. Modifier does that, and combined with AlternateModifier require Shift+Ctrl.
So I could very well have a menuItem that is accessed by Alt-F followed by i (Menu Shortcut), which is also accessed by Ctrl-Shift-i (Keyboard shortcut).
Works fine here with a menuitem keyboard shortcut of i, with both Modifier and AlternateModifier switched on. Of course you need to make sure to have a menu handler.
In the Of course part: I understand the irony in the text because this happens to me once or twice in the past to forget to add a part of the process and asking myself Why is this disfunctional ? or ;- ~depends on the point in time you think at (the momoent youre debugging or later ).
As far as I can recall, I never had troubles with XPlatform projects with MenuItems, so I never spend many times debugging them, but here, the first thing in the debugging function was to try to Insert (then Delete and Add) a new Column in a Listbox and none of them responded to my keyboard test BAD. And end of the debug session.
I took a bit of time yesterday to watch the project (hum an old version of the project) with Windows 10 / Xojo 2015r1:
in the MenuBar Editor, the properties for the menuitems are strange. As for my example, instead of seeing ctrl+I (I think) in the MenuItem, I only have the letter
Also, I do not understand the MenuItem properties, the CheckBox ones on both OS X and Windows (I think it always been that dark) It says MacControlKey, etc. Looks strange when you have both machines/OS screens side by side. I will open a new conversation about that asap.
In the mean time, I will try to make a comparative session this afternoon to try to understand what really happens there.
Ctrl-& works fine when you type 1 on the numeric keypad. On a French keyboard ■■■■■■■■■-& which would be 1 won’t work.
It looks as if it is not possible to detect Ctrl-1 (upper left key of the typewriter keyboard), as AsyncKeydown does work, but Keyboard.ControlKey does not turn true in this particular instance.
Choosing only alphabetic key shortcuts seems far better.