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
Shortcuts on Windows are usually alt-key. In your case, please check alt-key and alt-shift-key.
Thank you for your answer.
alt key ?
I really have to change my glasses (I cant do anything for my memory) !
I use nearly daily a Microsoft application (MICE), and use ctrl-
(and on Paint too).
I never noticed anything (in the last two years or so (prior that, I do not recall anything).
I will check that when I will be back, near my Windows 10 laptop.
I have some minutes to be used for a Windows quest (while some downloadings are pending):
Windows 10 shortcuts:
A more complete list (?):
So, yes, alt exists !
There are several shortcuts in Windows.
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.
Thanks for that awesome write up, Michel.
Thank you trying to explain things.
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.
Feedback on this:
Ive made WIndows Updates yesterday morning, then, in the evening,Ive made some debugging (I movedthe project and its associated files / folders).
The result was surprising: everything worked as expected (the MenuItem shortcuts) excepted ctrl+1. I will change it.
Of course, I found a lot or glitches here and there that I corrected.
Thank you all.
With A LIttle Help From MMy Friends
Ctrl-& works fine when you type 1 on the numeric keypad. On a French keyboard Ctrl-Shit-& 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.
You may also want to make sure not to pick a shortcut used by Windows itself :
And for Cross-platform compatibility, OS X shortcuts : https://support.apple.com/en-us/HT201236
Wise advice, thank you Michel.