Can't Display Keyboard Shortcuts in Popups
Richard Gaskin
ambassador at fourthworld.com
Wed Apr 20 11:35:19 EDT 2016
Ray wrote:
> I'm unable to popup a button as a contextual menu and show keyboard
> shortcuts. For example, I'd like users to see "Audio ctrl+A", not
> just "Audio".
>
> The button's style is "menu" and the button's contents for that line
> is "Audio/A". The "Audio ctrl+A" displays fine as long as the
> button's "menuMode" is pulldown, but as soon as I use the popup
> command to pop the button up contextually, it's menuMode is changed
> to "popUp". This loses the display of the keyboard shortcut. I now
> only see "Audio" instead of the desired "Audio ctrl+A".
>
> Does anyone know how to keep keyboard shortcuts while using the popup
> command?
I don't believe the OS APIs support that. The HIGs for all supported
desktop platforms suggest using context menus as a secondary convenience
for items also available in the more visible menu bar.
Given that design mandate, it seems the assumption is that users can
learn shortcuts when viewing the menu item in their primary location,
regardless whether a subset of those items is also available in a more
ephemeral secondary form such as a context menu.
On an implementation level, following the design mandate certainly makes
things easier for the developer, as both LiveCode and the OS support
keyboard triggers for visible menu items such as those in the menu bar,
but since a popup only exists at the moment it's popped up there's no
way to hook the event from the object.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list