Arrow Key Message on a Mac
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Arrow Key Message on a Mac
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.
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Arrow Key Message on a Mac
Hi,
It sounds like you have to set the textarrows to false
Best regards
Jean-Marc
It sounds like you have to set the textarrows to false
Best regards
Jean-Marc
https://alternatic.ch
Re: Arrow Key Message on a Mac
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.
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
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
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
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
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
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
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
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Arrow Key Message on a Mac
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.
I tested your script with LC community 8.0.0 and Indy 8.1.1 and it works.
https://alternatic.ch
Re: Arrow Key Message on a Mac
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!