handling raw keys on android
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 40
- Joined: Thu May 17, 2018 7:32 pm
- Location: Florida, USA
handling raw keys on android
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
thanks,
mark
Re: handling raw keys on android
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.
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.
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: handling raw keys on android
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.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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: handling raw keys on android
What would it do on a server?
I wonder if that's a docs error.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: handling raw keys on android
Well, much as I hate to admit it, I haven't actually tested much server code 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
-
- Posts: 40
- Joined: Thu May 17, 2018 7:32 pm
- Location: Florida, USA
Re: handling raw keys on android
I have returned to this issue since ADA support on Chromebook is getting more attention from my user base. I did some research and from the ChromeOS documentation, it appears that (according to Google) ChromeOS fully supports the android keyboard support. I retried intercepting raw key down and up in my LC app running on Chromebook and the events are not fired. Given what Google is saying about their support, I wonder if anyone can verify that rawKeyDown and rawKeyUp work on the Android. I can make a test app, but if anyone already knows, then I won't waste the time.
thanks,
Mark
thanks,
Mark
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: handling raw keys on android
RawKeyDown is for LiveCode fields. On mobile it's strongly recommended to use a mobile-native field.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 9386
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: handling raw keys on android
Does that mean a mobile-native field cannot receive a virtual rawKeyDown/Up signal from the onboard virtual keyboard?RawKeyDown is for LiveCode fields. On mobile it's strongly recommended to use a mobile-native field.
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: handling raw keys on android
Mobile-native controls have their own mobile-native messages. Some are equivalent to those we use for LC fields, but they are a relatively slim subset of the full nuanced richness of LC field messages.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn