Shortcuts for pulldown menu and other things

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ale870
Posts: 250
Joined: Tue Apr 22, 2008 9:17 am
Contact:

Shortcuts for pulldown menu and other things

Post by ale870 » Tue Aug 11, 2009 10:54 pm

Hello,
how can I setup a shortcut for MAIN pulldown menu?
For its items I can use "&" but if I use it on main pulldown (menu like FILE, EDIT, VIEW, etc...) symbol "&" has no effect.

One thing more: generally speaking, what's the best technique in RunRev to manage functions shortcut (e.g. CTRL-D to delete something, ALT-X to exit, etc....)

I want these shortcuts work even if a button has the focus, or if a field has focus, etc...

Thank you for your help!

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Tue Aug 11, 2009 11:16 pm

You should have a look up in the docs for acceleratorKey, acceleratorModifiers and acceleratorText as well as - I feel you're looking for a Windows specific solution here, the mnemonic of a button.

To catch certain key combinations you will probably need to think carefully about where you want to intercept them in the message path and quite possibly put a rawkeyDown handler in the card or stack script, if not a frontscript. If the key combinations are appropriate for the situation then you can handle what is needed, otherwise pass the rawkeyDown message to be taken care of as normal (eg typing a letter in a field). It's hard to be more specific.

ale870
Posts: 250
Joined: Tue Apr 22, 2008 9:17 am
Contact:

Post by ale870 » Tue Aug 11, 2009 11:32 pm

Thank you, I will check accelerators and frontscript (just to verify).

About Windows... no, I'm creating a cross platform editor with many unusual features (I work on Linux Mint 6 :D ).

Post Reply