Prevent Arrow Keys Changing Cards

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Prevent Arrow Keys Changing Cards

Post by endernafi » Fri Apr 12, 2013 10:27 am

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
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

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

Re: Prevent Arrow Keys Changing Cards

Post by Klaus » Fri Apr 12, 2013 10:57 am

Merhaba Ender,

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


Best

Klaus

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: Prevent Arrow Keys Changing Cards

Post by endernafi » Fri Apr 12, 2013 11:12 am

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
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

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

Re: Prevent Arrow Keys Changing Cards

Post by Klaus » Fri Apr 12, 2013 11:51 am

Hi Ender,

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


Best

Klaus

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: Prevent Arrow Keys Changing Cards

Post by endernafi » Fri Apr 12, 2013 12:28 pm

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
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

Randy Hengst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 157
Joined: Thu Jun 29, 2006 4:16 pm

Re: Prevent Arrow Keys Changing Cards

Post by Randy Hengst » Sat Apr 13, 2013 1:00 am

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

Post Reply