Post Reply 
Android app and physical keyboard
11-20-2019, 04:27 AM
Post: #1
Android app and physical keyboard
Hi folks,

I'm an old HP user from long ago. I did a lot of stuff with the HP48 back in the day, and now I've just purchased the Prime android app. It's really quite wonderful. Things really have come a long way since the HP48.

However, I have one problem that's quite annoying, and so I thought I'd ask to see whether anyone knows a workaround.

I am an avid user of Android tablets, and I typically use a bluetooth physical keyboard. So I've got the android Prime app running on my Samsung Galaxy S3 in landscape mode, which works quite well,...except that the spacebar on the physical keyboard opens the Prime app's main android menu (upper left), instead of just behaving like a simple "space". This is particularly troubling when trying to enter a "note", which should be super easy with a physical keyboard, and instead turns into a nightmare.

Does anyone know a way to override the app's default handling of the spacebar to activate the android app menu?

Joe
Find all posts by this user
Quote this message in a reply
11-20-2019, 01:39 PM
Post: #2
RE: Android app and physical keyboard
I don't think there is any way to do that. I am surprised however. Note there is a beta up currently and you can work with me to ensure it is working properly.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
11-20-2019, 02:34 PM
Post: #3
RE: Android app and physical keyboard
Maybe you could try something like https://play.google.com/store/apps/detai...oardhelper ?

I could think on hardware workarounds but they are not easy to implement.

My website: ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
11-20-2019, 03:09 PM
Post: #4
RE: Android app and physical keyboard
(11-20-2019 01:39 PM)Tim Wessman Wrote:  I don't think there is any way to do that. I am surprised however. Note there is a beta up currently and you can work with me to ensure it is working properly.

Hi Tim,

Why do you say that? The behavior of the keyboard space-bar is specific to each app, and usually modal at that. Web browsers like chrome and Adobe's pdf reader take space-bar as "page down" when reading, but when an input field is selected, it's just "space". Seems clear that the app is in control of the interpretation of space-bar.

The Prime app doesn't seem to make any distinction about what is going on. Space-bar just always activates the app's main android menu (i.e. the "HP Prime" menu). It doesn't seem to matter whether I'm trying to edit a note, or do programming,...every time I hit space-bar that darn menu pops up. It's very unfortunate, because running the Prime app on a landscape tablet with a proper keyboard is really super cool otherwise.

Is there someone on the app development front that I can engage directly with?

Sincerely,

Joe
Find all posts by this user
Quote this message in a reply
11-20-2019, 03:20 PM
Post: #5
RE: Android app and physical keyboard
(11-20-2019 01:39 PM)Tim Wessman Wrote:  I don't think there is any way to do that. I am surprised however. Note there is a beta up currently and you can work with me to ensure it is working properly.

Hi Tim,

I'm quite new to hpmuseum. When you say there's a "beta up currently",...where is that exactly? I looked on google play and didn't see anything. Is there an apk that I need to download directly to my tablet?

Sincerely,

Joe
Find all posts by this user
Quote this message in a reply
11-20-2019, 04:14 PM
Post: #6
RE: Android app and physical keyboard
(11-20-2019 03:09 PM)JosephErvin Wrote:  
(11-20-2019 01:39 PM)Tim Wessman Wrote:  ... you can work with me to ensure it is working properly.

... Is there someone on the app development front that I can engage directly with?

Tim is the guy you are seeking. BTW he told it twice to you - at his reply and in his signature. :-)

Prime G2, 15C CE
Find all posts by this user
Quote this message in a reply
11-20-2019, 04:28 PM
Post: #7
RE: Android app and physical keyboard
(11-20-2019 03:20 PM)JosephErvin Wrote:  When you say there's a "beta up currently",...where is that exactly? I looked on google play and didn't see anything.

This thread is only about 5-6 threads down from yours:

https://www.hpmuseum.org/forum/thread-13855.html

If you want it solved, as chromos said, work with Tim. Contact him via PM or email through the forum, providing as much detail as you can (e.g. is there any other keyboard s/w installed on the tablet, etc.) and it will be resolved.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
11-20-2019, 06:23 PM
Post: #8
RE: Android app and physical keyboard
Got it. I grabbed the Linux beta and am running it now.

Sorry for being obtuse on Tim's offers to help.

Just as a note, the virtual calc works fine with the computer keyboard input on Linux (i.e. space-bar is space, and Enter is Enter, and I expect Windows (haven't tried that one yet), but it's broken for Android (space-bar opens upper left app menu, and the Enter key doesn't seem to do anything at all. I'll compile a more complete list of keyboard anomalies under Android and will reply ASAP.

Sincerely,

Joe
Find all posts by this user
Quote this message in a reply
11-20-2019, 11:59 PM (This post was last modified: 11-21-2019 12:44 AM by Tim Wessman.)
Post: #9
RE: Android app and physical keyboard
(11-20-2019 06:23 PM)JosephErvin Wrote:  Got it. I grabbed the Linux beta and am running it now.

Sorry for being obtuse on Tim's offers to help.

Just as a note, the virtual calc works fine with the computer keyboard input on Linux (i.e. space-bar is space, and Enter is Enter, and I expect Windows (haven't tried that one yet), but it's broken for Android (space-bar opens upper left app menu, and the Enter key doesn't seem to do anything at all. I'll compile a more complete list of keyboard anomalies under Android and will reply ASAP.

Sincerely,

Joe

Yeah, the issue is there is some code to handle external keyboards in android (just specific to the android version) and I know it worked at some point. I don't see when or how it remapped the space. The code looks ok...

[EDIT] Ok, was able to reproduce this here. Looks like at some point the system started intercepting a space event at a higher level. Now I just need to figure out how to disable that...

[EDIT2] Ok, figured it out. Looks like the ENTER key also had a similar behavior. Any other keys apart from space and enter that misbehave for you? Please test everything so we hopefully don't miss any. Thanks!

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
11-21-2019, 03:57 AM
Post: #10
RE: Android app and physical keyboard
HI Tim,

I tried the Android app on my Samsung Galaxy S4 tablet and my Moto G5s+ phone. The results are identical.

All keys do what you would expect except for the space-bar and Enter key, which both seem to bring up the App menu in the upper left corner. Also, the Tab key acts as the Alpha key, which doesn't really serve any useful purpose that I can see. In most android apps, the Tab key on the keyboard would possibly be used to move from section to section, like in Windows. I'm not sure I can think of a better purpose for it on the calculator, but Alpha doesn't serve any purpose, since you have direct access to all the letters, both upper and lower case.

I did stumble onto a minor bug. Check out the attachment. Look at the number keys carefully :-)

I stumbled onto it more or less immediately when testing the number keys across the top of the keyboard. If you press one key, and then press another key before releasing the first, the app gets a little confused about the graphics that it uses to show key pressed vs. key released. The artifact presents itself only while the keys are pressed. When all keys are released, it resolves.

Sincerely,

Joe Ervin


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
11-21-2019, 09:46 PM
Post: #11
RE: Android app and physical keyboard
Hi Tim,

I installed and have been testing the new beta on the play store (2.1.14346). The behavior of the space-bar and Enter keys, and those are working properly now. Thank-you for the quick turn-around.

I've been bouncing back and forth between the Linux and Android versions of the virtual Prime, and there are a few other things that I've noted:

On Linux, CTRL maps to Shift, and Tab maps to ALPHA. In Android, the Tab maps to ALPHA, but CTRL does not map to anything. I have yet to identify a compelling use for these mappings, so I mention this for completeness.

CAPSLOCK on Linux works as expected,...after pressing it, the keyboard CAPSLOCK LED comes on and subsequent keystrokes are in all caps. On the Android App, CAPSLOCK does nothing, so typing in caps requires the use of the normal Shift key. This is a minor inconvenience, but being an engineer, I do use the capslock key for things like variable names, signal names, register names, etc., and that's how I noticed the difference. The CAPSLOCK key does work as expected in all other Android apps I use.

ESC handling on Android is arguably broken, and this one would be really great if it could be fixed. In the virtual Prime app, pressing the ESC key does *two* things: first, it stimulates the key in the upper right of the keyboard called ESC (with shifted function "Clear"). This is the desired behavior. The second thing that happens is that the app then processes the ESC key also as (I think) the "back" function, which invariably returns the Android to the Android home screen, backgrounding the Prime app. This is decidedly unhelpful. It didn't occur to me that the app doesn't do this until I noted that on Linux the ESC key just maps to ESC/Clear, which is nice, so getting that same behavior on Android would be awesome.

By way of background, the ESC keyboard key is mapped variously in different Android apps. Chrome does nothing with it, Gmail uses it as an alias for the "back" button, as do some other apps. The important counter-example is an ssh app I use called "JuiceSSH". This app has a modality to its ESC handling, where it works as a "back" button up to the point where an ssh session is established, and at that point the ESC key is passed through the terminal to the remote system, as one might expect. This is similar to the desired behavior of ESC in the Prime app, i.e. map it to the ESC/Clear key, but don't otherwise do anything "Android-ish" like what happens when the "back" key is pressed.

I hope this helps. Prime on an Android tablet in landscape with a bluetooth keyboard rocks. The app expands a bit to fill the screen, which I love (old eyes), and the ability to interact with it directly with a qwerty keyboard is fabulous.

Thank-you for your outstanding work.

Sincerely,

Joe Ervin
Find all posts by this user
Quote this message in a reply
11-21-2019, 10:48 PM
Post: #12
RE: Android app and physical keyboard
Hi Tim,

I just thought of a reason why having the Linux mapping from CTRL to SHIFT would be good. It allows you to do "Clear" from the qwerty keyboard (press and release CTRL which sets SHIFT on the Prime, then press and release ESC). This works great on the Linux app.

Interestingly, you might think that the Tab key and CTRL keys together could be used to control the upper/lower case of the characters sent by the keyboard, but they don't...the keyboard sends what it sends independent of the ALPHA "shift" flags showing in the upper left corner of the display. I don't see it as a big deal, because I think it's more intuitive to have the Linux behavior where Shift and CAPSLOCK works as expected.

Sincerely,

Joe
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)