View Single Post
Old 03-11-2012, 10:18 AM   #1
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Arrow Kindle input event device file names can CHANGE.

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:


Last edited by geekmaster; 03-11-2012 at 10:28 AM.
geekmaster is offline   Reply With Quote