Disabling keyboard shortcuts to cards

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
ibe
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 61
Joined: Sun Oct 04, 2009 12:15 pm

Disabling keyboard shortcuts to cards

Post by ibe » Thu Mar 11, 2010 6:46 pm

My application has four cards. They are shown depending on which tab or button a user has pressed. I would like to disable changing cards by using the keyboard shortcuts (cmd-2 Go Prev, cmd-3 Go Next, etc.). Can this be done? At least I would need to disable it in the standalone as the rest of the user interface does not change accordingly. Or can I trap these keyboard events and decide if I want to pass them on for default behaviour.

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

Re: Disabling keyboard shortcuts to cards

Post by Klaus » Thu Mar 11, 2010 7:00 pm

Hi ibe,

the IDE <> standalone!
That means if you do not add these shortcuts (in a menu or whatever) to your application, then this will of course not work in your standalone! :)

But one can use the arrokeys left/right to navigate!
To prevent this just add this line to your "preopenstack" or "openstack" script:
...
set the navigationarrows to false
...

Hope that helps!


Best

Klaus

ibe
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 61
Joined: Sun Oct 04, 2009 12:15 pm

Re: Disabling keyboard shortcuts to cards

Post by ibe » Thu Mar 11, 2010 7:12 pm

Thanks Klaus, just what I needed.

massung
Posts: 93
Joined: Thu Mar 19, 2009 5:34 pm

Re: Disabling keyboard shortcuts to cards

Post by massung » Thu Mar 11, 2010 7:19 pm

Klaus wrote:But one can use the arrokeys left/right to navigate!
Wow, I did not know this. I'm glad I stumbled upon this.

Jeff M.

Johdu
Posts: 7
Joined: Sun Jun 11, 2006 6:07 pm
Contact:

Re: Disabling keyboard shortcuts to cards

Post by Johdu » Thu Jun 10, 2010 9:40 am

@Klaus
Thank you for "set the navigationarrows to false" ... still learning!

johdu
http://www.revclever.com

Post Reply