HP Forums
Numworks Python: Any way to detect keydown on Android? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not remotely HP Calculators (/forum-9.html)
+--- Thread: Numworks Python: Any way to detect keydown on Android? (/thread-21444.html)



Numworks Python: Any way to detect keydown on Android? - StephenG1CMZ - 03-12-2024 09:18 AM

Numworks Python has a keydown function
Code:

from ion import *
#cursor keys
        if keydown(KEY_LEFT):
        elif keydown(KEY_RIGHT)
etc.
I understand this may work on the real device, and some keys do work on the Android App running on a Chromebook (though you have to use the Chromebook Shift, Tab, Esc and cursor keys, not those of the virtual calculator keypad).

These keys have no effect on the virtual Numworks keypad - so is there any way of detecting keydown on a normal Android, or of emulating a Chromebook keyboard on an Android perhaps?
I wonder whether adding a Bluetooth keyboard might help?
[Line input is possible but not keydown]


RE: Numworks Python: Any way to detect keydown on Android? - StephenG1CMZ - 03-16-2024 08:13 PM

I have just added a Bluetooth keyboard to Android, and the preliminary result is YES - at least the tab/toolbox key on the external keyboard is seen, all I have tried so far.

(Note that whilst an external keyboard is connected, it might be difficult to use the on-screen keyboard for messaging)

Or course, most mobiles don't travel with an external keyboard, so having a version of the programs that does something useful without user buttons remains useful - and a version of Numworks that didn't need the external keyboard would be nice too.