Shortcuts-property inspector

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
laurpapo
Posts: 38
Joined: Thu Jun 21, 2012 4:25 pm

Shortcuts-property inspector

Post by laurpapo » Fri Jun 22, 2012 3:47 pm

Hi,

So I have a bunch of buttons created and want to create shortcuts for each of them. I know I could edit the script with if/then statements to determine whether or not certain keys are down, but I saw that we can create shortcuts in the property inspector, instead. I did that, selecting command and shift and putting 'n' as the accelkey, yet nothing happens. Am I missing something?

Thank you,

Laurel

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Shortcuts-property inspector

Post by Mark » Fri Jun 22, 2012 4:14 pm

Hi Laurel,

Are you using Mac? I never could get this to work on a Mac, but it works fine on Windows.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

laurpapo
Posts: 38
Joined: Thu Jun 21, 2012 4:25 pm

Re: Shortcuts-property inspector

Post by laurpapo » Fri Jun 22, 2012 4:18 pm

Bummer. I am indeed using a mac.

I just tried to do it the long way (if the commandkey is down then, etc.) and this seems not to work either...any ideas?

-Thanks

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Shortcuts-property inspector

Post by Mark » Fri Jun 22, 2012 4:28 pm

Hi,

I don't know what you tried exactly, but you could put this into the card or stack script:

Code: Select all

on commandKeyDown theKey
  if theKey is "B" and the shiftKey is down then
    send "mouseUp" to btn "B"
  end if
end commandKeyDown
This script works with a button with name "B".

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

laurpapo
Posts: 38
Joined: Thu Jun 21, 2012 4:25 pm

Re: Shortcuts-property inspector

Post by laurpapo » Fri Jun 22, 2012 4:57 pm

Well now I just feel dumb...worked perfectly.

Thanks much!

-Laurel

Post Reply