I have been doing most of my native mode program and script testing in diags SSH recently, because on the k4 and touch, there is a "
Lock to HOME Button" menu item, and I can safely test touchscreen events there without accidentally pressing active buttons or menu items on the window hidden below my app.
I discovered that when I boot my touch to
main and launch SSH using yifanlu's launcher menu, the touchscreen events are at
/dev/input/event4 like I documented some time ago in mobileread posts.
But when I boot
diags and run SSH from the "
Enable USBnet" menu, the touchscreen events are at
/dev/input/event3 like I have been using in my recent scripts:
touchpaint (touchscreen ascii paint), and
oskb (onscreen keyboard).
This means that even on a single device, we cannot trust input device filenames. We must follow the examples for linux event processing shown elsewhere on the net, where those examples scan ALL input devices, looking for one with
PROPERTIES that match the device that we want to use.
The "correct" way to open an input event device must first
FIND that device, making no assumptions as we have been doing here (including other event processing such as in the
myts onscreen terminal).
We must NOT just ASSUME that a device has a fixed file name, even on a kindle touch.
And while discussing linux devices, perhaps a native mode app can easily control framework menus and kindlets with this gizmo daemon: