Post Reply 
Numworks Python: Any way to detect keydown on Android?
03-12-2024, 09:18 AM (This post was last modified: 03-12-2024 12:12 PM by StephenG1CMZ.)
Post: #1
Numworks Python: Any way to detect keydown on Android?
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]

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
03-16-2024, 08:13 PM (This post was last modified: 03-16-2024 11:28 PM by StephenG1CMZ.)
Post: #2
RE: Numworks Python: Any way to detect keydown on Android?
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.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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