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

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: 10356
Joined: Wed May 06, 2009 2:28 pm

Re: Menu shortcuts with arrow keys?

Post by dunbarx » Sat Feb 09, 2013 11:49 pm

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

That's exactly what I'm looking for. I hope someone has a solution.

Klaus
Posts: 14213
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Menu shortcuts with arrow keys?

Post by Klaus » Sun Feb 10, 2013 12:40 am

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: 10356
Joined: Wed May 06, 2009 2:28 pm

Re: Menu shortcuts with arrow keys?

Post by dunbarx » Sun Feb 10, 2013 1:25 am

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 » Sun Feb 10, 2013 11:21 am

I did'nt find a good example of how to use it but finally it works.
Thanks for your great help, Klaus.

Klaus
Posts: 14213
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Menu shortcuts with arrow keys?

Post by Klaus » Sun Feb 10, 2013 12:08 pm

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