Page 1 of 1

Menu shortcuts with arrow keys?

Posted: Sat Feb 09, 2013 10:03 pm
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!

Re: Menu shortcuts with arrow keys?

Posted: Sat Feb 09, 2013 11:49 pm
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

Re: Menu shortcuts with arrow keys?

Posted: Sun Feb 10, 2013 12:00 am
by stefjeubs
That's exactly what I'm looking for. I hope someone has a solution.

Re: Menu shortcuts with arrow keys?

Posted: Sun Feb 10, 2013 12:40 am
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

Re: Menu shortcuts with arrow keys?

Posted: Sun Feb 10, 2013 1:25 am
by dunbarx
Klaus.

Well, sure, if you read the dictionary.

Craig

Re: Menu shortcuts with arrow keys?

Posted: Sun Feb 10, 2013 11:21 am
by stefjeubs
I did'nt find a good example of how to use it but finally it works.
Thanks for your great help, Klaus.

Re: Menu shortcuts with arrow keys?

Posted: Sun Feb 10, 2013 12:08 pm
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