Page 1 of 1
Arrow Key Message on a Mac
Posted: Tue Dec 13, 2016 10:38 pm
by dvermes
My students are working on an app involving arrow keys causing movement of an object. We are using the arrowKey message. It works fine in Windows, but on a Mac, the arrow keys do not seem to trigger the arrowKey message when developing the app. (If it is deployed as a stand-alone app, then it works fine on a Mac). Is this a known issue with LiveCode on the Mac? We're using LiveCode 8.1.1 Community Edition.
Re: Arrow Key Message on a Mac
Posted: Wed Dec 14, 2016 10:38 am
by jmburnod
Hi,
It sounds like you have to set the textarrows to false
Best regards
Jean-Marc
Re: Arrow Key Message on a Mac
Posted: Wed Dec 14, 2016 1:14 pm
by dvermes
I just tried setting the textarrows to false, but it didn't make any difference. What I am trying to do is this:
On a card, I have an image. In the script for the card, I have:
on arrowKey theKey
if theKey is "right" then move image "imgStar" relative 10,0
end arrowKey
When I put the program into run mode (Browse tool), in Windows, pressing the right arrow key moves the image right. On a Mac, pressing the right arrow key does nothing. I've put a breakpoint in the arrowKey handler and it is not triggered on the Mac, leading me to believe the arrowKey event is not running. However, if I deploy it as a standalone app, then it works fine regardless of if it's in Windows or on a Mac.
Re: Arrow Key Message on a Mac
Posted: Wed Dec 14, 2016 1:57 pm
by Klaus
Hi dvermes,
just made a test on macOS 10.12.2 with LC 8.1.2 RC3 and your script works as exspected in the IDE!
Sure there are not other (front-/backscripts) in the way in your IDE?
Best
Klaus
Re: Arrow Key Message on a Mac
Posted: Wed Dec 14, 2016 2:01 pm
by dvermes
Klaus,
I'm not sure. What sort of front/backscripts should I be looking for? My stack has a stack script and the card has a card script...
Thanks,
Doug
Re: Arrow Key Message on a Mac
Posted: Wed Dec 14, 2016 2:13 pm
by Klaus
Hi Doug,
if this also happens right after starting LC then there is probably no script in the way.
You could send me the stack if you like and I will take a look: klaus AT major-k.de
Best
Klaus
Re: Arrow Key Message on a Mac
Posted: Wed Dec 14, 2016 2:40 pm
by jmburnod
Sorry, I was wrong, setting textarrows has no effect
I tested your script with LC community 8.0.0 and Indy 8.1.1 and it works.
Re: Arrow Key Message on a Mac
Posted: Wed Dec 14, 2016 2:50 pm
by dvermes
It looks like it's a LiveCode bug. I was running LiveCode 8.0.1 Community Edition on a Mac and the arrow keys did not work. I just downloaded LiveCode 8.1.2 RC3 Community Edition and it works fine on a Mac. Thanks to Klaus for helping me troubleshoot!