handling raw keys on android

The place to discuss anything and everything about running your LiveCode on Android

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
markhinnebusch
Posts: 29
Joined: Thu May 17, 2018 7:32 pm
Location: Florida, USA

handling raw keys on android

Post by markhinnebusch » Wed Oct 17, 2018 12:18 am

I'm trying to port my program to Chromebook by making it an Android app and so far, everything has worked fairly well. One problem that I have is that I need to capture keystrokes so that I can implement shortcuts in the app (for ADA compliance). It appears that the rawkeydown event is not being fired. I added an answer at the top of the handler and it shows the raw key code when i run it on Mac and Windows but not on the Chromebook. I've looked around in the livecode docs and maybe there is something there but if so, I couldn't find it. Any pointers would be very much appreciated.

thanks,
mark

bogs
Posts: 2312
Joined: Sat Feb 25, 2017 10:45 pm

Re: handling raw keys on android

Post by bogs » Wed Oct 17, 2018 1:48 pm

The main problem your going to be facing isn't Lc related in this instance, but ChromeOs related.

While Google has recently started letting android apps run on it, they didn't do that by turning Chrome into android, they made a compatibility or virtual layer instead (like your app tester for android on the main desktop).

RawKeyDown works on supported desktops, mobile and server platforms, but how far any android app is going to work on Chrome will depend on how much of andoid's subsystem is supported and correctly implemented.

When I was doing a similar experiment last year (before google implemented all this stuff), I bypassed chrome completely and shoved crouton onto a chromebook I was borrowing for this experiment. Since that was a real 'nix implementation, all of the code more or less worked (after setting up the 'nix with additional libraries and such). The rawKey* statements all worked as you might expect them to in that environment.

I should add here that my testing buddy found that using Wine in that environment worked even better than the straight up 'nix program did. Go figure.
Image

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4673
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: handling raw keys on android

Post by jacque » Wed Oct 17, 2018 6:14 pm

RawKeyDown works on supported desktops, mobile and server platforms, but how far any android app is going to work on Chrome will depend on how much of andoid's subsystem is supported and correctly implemented.
That makes sense, I'd expect Chromebooks to support only those things that mobile Android apps can do. There are no modifier keys on the on-screen keyboard so they aren't likely to be supported on the Chromebook.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6180
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: handling raw keys on android

Post by FourthWorld » Wed Oct 17, 2018 7:30 pm

bogs wrote:
Wed Oct 17, 2018 1:48 pm
RawKeyDown works on supported desktops, mobile and server platforms...
What would it do on a server?

I wonder if that's a docs error.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

bogs
Posts: 2312
Joined: Sat Feb 25, 2017 10:45 pm

Re: handling raw keys on android

Post by bogs » Wed Oct 17, 2018 10:47 pm

Well, much as I hate to admit it, I haven't actually tested much server code :oops: but, if you ever come up with a reason to need to see the rawKey input somehow, like maybe receiving an ultra secret password or whatever, then you can come back and tell us if it actually works there :wink:
Image

Post Reply

Return to “Android Deployment”