How to bring focus to the menu bar by pressing ALT

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
hylton
Posts: 53
Joined: Thu Oct 04, 2012 12:49 pm

How to bring focus to the menu bar by pressing ALT

Post by hylton » Sun Apr 12, 2015 10:35 am

The standard in Windows is that if an app has focus and ALT is pressed, the menubar becomes focused.

Notepad with focus:
Notepad with Focus.PNG
Notepad with Focus.PNG (10.23 KiB) Viewed 2569 times
Notepad with focus after pressing the ALT key once:
Notepad with Focus After Pressing ALT.PNG
Notepad with Focus After Pressing ALT.PNG (13.51 KiB) Viewed 2569 times
Notepad with focus after pressing the ALT key once, then pressing on the down arrow key once:
Notepad with Focus After Pressing ALT and Pressing Down Arrow.PNG
Notepad with Focus After Pressing ALT and Pressing Down Arrow.PNG (20.2 KiB) Viewed 2569 times
The keyboard shortcut equivalent to this is pressing: ALT+F.

How do I implement:
1. Press ALT to focus the menu bar and then press down to show the menu?
2. Press ALT+F to show the same menu?

Note: The accelerator keys in the LiveCode IDE do not work: ALT+F does nothing, even though F is underlined.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: How to bring focus to the menu bar by pressing ALT

Post by LCNeil » Wed Apr 15, 2015 4:51 pm

Hi hylton,

I believe menu bars are a custom group implementation in LiveCode so default menu behaviours might not work as expected.

It does seem like a single alt click is one of these features not directly implemented but when I press "Alt + F" the file menu pops up as expected on a sample stack that I create. This works both within the IDE and a standalone built from this stack.

Could you supply a sample stack and your LC version and I can happily look into this.

In regards to using a single ALT click, it may be easier to generate your own menu and then use the various optionKey messages to handle such menu interaction.

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--

ToddFabacher
Posts: 280
Joined: Fri Jan 09, 2015 6:15 pm

Re: How to bring focus to the menu bar by pressing ALT

Post by ToddFabacher » Wed Apr 15, 2015 11:51 pm

For you own menu Hylton, you need to set it in the menu builder. For each entry, there is a shortcut checkbox. From there you can choose ctrl, cmd, shift or alt..+ the letter. This needs to be set in order for the menu shortcut to work.

You can set the Mnemonic, which will underline the letter, but the shortcut will not work unless you check it and enter your desired options.

Hope this helps,

Todd

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”