How to get top level menu item shortcuts to work?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to get top level menu item shortcuts to work?

Tim Mackinnon
Hi - I tried asking this on Discord, but it got lost in the day to day stuff - so trying here.

I am a bit confused how Keyboard shortcuts work in P8 for World menus.  I have a method with the <worldMenu> pragma, and I get aBuilder, and I create a top level menu item. Then to add a child, it seems that I just create a new #item: and set its #parent: to the new id I've created (all good), and then I set #keyText: 'r, o'  and while it shows a menu item with CMD-RO in its text, the keystroke doesn't seem to work. I've tried different options even, 'o, x' but none of them trigger - so I must be missing something? Anyone know?

My code looks like this (menuId = #Paradise - the top level menu item I have created)

| menuId |
       
(aBuilder item: (menuId := #Paradise))
                order: 4.0;
                target: self;
                help: 'Tools to support Code Paradise projects'.

(aBuilder item: #'Reload...')
                parent: menuId;
                help: 'Clear the session for a web application, and reload its''s page';
                order: 15;
                keyText: 'r, r';
                icon: (self iconNamed: #smallUpdate);
                action: [ self resetSession ].