Menu shortcuts with arrow keys?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
stefjeubs
Posts: 3
Joined: Sat Feb 09, 2013 9:53 pm

Menu shortcuts with arrow keys?

Post by stefjeubs »

Hi all,

New to Livecode, I have found how to create a shortcut with Command + Arrow key using scripts, but I'd like to show this kind of shortcut in my menubar.
It seems that these useful characters are unavailable in this context…

Any way to use them?

Thanks for your help!
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10502
Joined: Wed May 06, 2009 2:28 pm

Re: Menu shortcuts with arrow keys?

Post by dunbarx »

Do you mean that a menuItem will have, say, a command symbol coupled with a left arrow as a shortcut designator?

You cannot do this in the menuBuilder. I am not sure you can do it at all, at least not natively.

There are smarter people out there than me, though.

Craig Newman
stefjeubs
Posts: 3
Joined: Sat Feb 09, 2013 9:53 pm

Re: Menu shortcuts with arrow keys?

Post by stefjeubs »

That's exactly what I'm looking for. I hope someone has a solution.
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Menu shortcuts with arrow keys?

Post by Klaus »

Hi Stef,

1. welcome to the forum! :D

2. Sure ths is possible! Open the dictionary and look up "menu".
Put this into a menu button and see:
Menu with left arrowkey/Left|handler4thismenuitem1
Menu with right arrowkey/Right|handler4thismenuitem2
Menu with up arrowkey/Up|handler4thismenuitem3
Menu with down arrowkey/Down|handler4thismenuitem4

Come on guys, the docs aint that bad! 8)


Best

Klaus
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10502
Joined: Wed May 06, 2009 2:28 pm

Re: Menu shortcuts with arrow keys?

Post by dunbarx »

Klaus.

Well, sure, if you read the dictionary.

Craig
stefjeubs
Posts: 3
Joined: Sat Feb 09, 2013 9:53 pm

Re: Menu shortcuts with arrow keys?

Post by stefjeubs »

I did'nt find a good example of how to use it but finally it works.
Thanks for your great help, Klaus.
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Menu shortcuts with arrow keys?

Post by Klaus »

Hej Stef,
stefjeubs wrote:I did'nt find a good example of how to use it but finally it works.
I gave you an example in my post, you just need to replace the "handler4thismenuitemN"
with the name of YOUR handler that handles this menupick! 8)
stefjeubs wrote:Thanks for your great help, Klaus.
My pelasure!

Please check these stack, great leraning resoureces:
http://www.runrev.com/developers/lesson ... nferences/

Best

Klaus
Post Reply