Page 1 of 1

Prevent Arrow Keys Changing Cards

Posted: Fri Apr 12, 2013 10:27 am
by endernafi
Hello Dear LiveCoders,

The arrow keys can be used to change the active card of the stack.
It's not an issue in development environment, I just don't press them 8)
But the behavior continues in the windows standalone app, too.
Now, that's a deal-breaker.
I recall that I saw somewhere in preferences such thing but now I couldn't find it.
How can I disable arrow keys changing cards?

And a follow-up question {actually, this is how I found out the above issue.}
I have a group full of check-boxes which is created on-the-fly.
In other apps {standard Windows or OS X apps},
user can wander around the check-boxes with arrow keys
and highlight or unhighlight the selected check-box with space key.
It's much faster, on occasion, than point-and-click with trackpad.
How can I get same functionality with LiveCode?


Thanks for any help...

Best,

~ Ender Nafi

Re: Prevent Arrow Keys Changing Cards

Posted: Fri Apr 12, 2013 10:57 am
by Klaus
Merhaba Ender,

1. just "set the navigationarrows to FALSE" "on openstack", that should fix it.
2. Sorry, no idea.


Best

Klaus

Re: Prevent Arrow Keys Changing Cards

Posted: Fri Apr 12, 2013 11:12 am
by endernafi
Hallo Klaus,

It did fix the issue partially:
in standalone all good now,
however, in development environment the left & right arrows still navigate through cards.
But like I said, it's not a big deal, the standalone was the important thing for me.

Danke...


Best,

~ Ender Nafi

Re: Prevent Arrow Keys Changing Cards

Posted: Fri Apr 12, 2013 11:51 am
by Klaus
Hi Ender,

the IDE has its own preferences!
Uncheck "Arrowkeys navigate through cards" in the LC prefs: General


Best

Klaus

Re: Prevent Arrow Keys Changing Cards

Posted: Fri Apr 12, 2013 12:28 pm
by endernafi
Aha :)
That's what I'm trying to remember and couldn't find.
"Lc Prefs -> General -> Arrow keys navigate ..."

Thank you very much Klaus, it's all fine now.

Ok, it's time to solve the second issue.
Anyone?

Edit: I can trap the rawKeyDown and write my own script.
What I'm asking is, is there any built-in property to get this functionality?
If there isn't, I'll get my hands dirty, right away 8)


Best,

~ Ender Nafi

Re: Prevent Arrow Keys Changing Cards

Posted: Sat Apr 13, 2013 1:00 am
by Randy Hengst
I've used the following in the IDE when I made stacks with cards larger than my screen.

hth,
randy hengst

on arrowKey theKey
switch theKey
case "down"
if the optionKey is "down" and the shiftKey is "down" then
move this stack relative 0,10
end if
break
case "up"
if the optionKey is "down" and the shiftKey is "down" then
move this stack relative 0,-10
end if
break
case "left"
if the optionKey is "down" and the shiftKey is "down" then
move this stack relative -10,0
end if
break
case "right"
if the optionKey is "down" and the shiftKey is "down" then
move this stack relative 10,0
end if
break
default
pass arrowKey
end switch
end arrowKey