View Single Post
Old 02-21-2019, 12:53 AM   #258
eruditionastic
Enthusiast
eruditionastic knows the difference between 'who' and 'whom'eruditionastic knows the difference between 'who' and 'whom'eruditionastic knows the difference between 'who' and 'whom'eruditionastic knows the difference between 'who' and 'whom'eruditionastic knows the difference between 'who' and 'whom'eruditionastic knows the difference between 'who' and 'whom'eruditionastic knows the difference between 'who' and 'whom'eruditionastic knows the difference between 'who' and 'whom'eruditionastic knows the difference between 'who' and 'whom'eruditionastic knows the difference between 'who' and 'whom'eruditionastic knows the difference between 'who' and 'whom'
 
Posts: 35
Karma: 10232
Join Date: Nov 2010
Device: G090G1 5.9.7 G090G1 5.10.2
Quote:
Originally Posted by NiLuJe View Post
Using a logical path (c.f., /dev/input/by-path) might be better to handle enumeration quirks like that .

(Plus, some Kindle variants *natively* have more stuff enumerated over USB (usually, an accelerometer or some weird extra thingy on 3G models)).
I'm not sure the absolute paths don't change all the time as well between devices. How about the following?

Returns "event4"
Code:
grep -B2 'EV=120013' /proc/bus/input/devices | grep -o 'event[0-9]'
Returns "event3"
Code:
grep -B2 'EV=1f' /proc/bus/input/devices | grep -o 'event[0-9]'
/proc/bus/input/devices contents:

Spoiler:
Code:
[root@kindle input]# cat devices
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="max77696-onkey"
P: Phys=max77696-onkey/input0
S: Sysfs=/devices/platform/imx-i2c.0/i2c-0/0-003c/max77696-onkey.0/input/input0
U: Uniq=
H: Handlers=kbd event0
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="cyttsp4_mt"
P: Phys=cyttsp4_mt.main_ttsp_core
S: Sysfs=/devices/platform/imx-i2c.1/i2c-1/1-0024/main_ttsp_core.cyttsp4_i2c_adapter/cyttsp4_mt.main_ttsp_core/input/input1
U: Uniq=
H: Handlers=event1
B: PROP=0
B: EV=f
B: KEY=6420 0 0 0 0 0 0 0 0 0 0
B: REL=0
B: ABS=2608000 0

I: Bus=0003 Vendor=0458 Product=0189 Version=0101
N: Name="Genius Wireless Mouse"
P: Phys=usb-fsl-ehci.0-1/input0
S: Sysfs=/devices/platform/fsl-ehci.0/usb1/1-1/1-1:1.0/input/input14
U: Uniq=
H: Handlers=event2 mouse0
B: PROP=0
B: EV=17
B: KEY=1f0000 0 0 0 0 0 0 0 0
B: REL=143
B: MSC=10

I: Bus=0003 Vendor=0458 Product=0189 Version=0101
N: Name="Genius Wireless Mouse"
P: Phys=usb-fsl-ehci.0-1/input1
S: Sysfs=/devices/platform/fsl-ehci.0/usb1/1-1/1-1:1.1/input/input15
U: Uniq=
H: Handlers=kbd event3
B: PROP=0
B: EV=1f
B: KEY=4837fff 72ff32d bf544446 0 0 1 20f90 8b17c000 677bfa d941dfed 9ed680 4400 0 10000002
B: REL=40
B: ABS=7fff01 0
B: MSC=10

I: Bus=0003 Vendor=0458 Product=0189 Version=0101
N: Name="Genius Wireless Mouse"
P: Phys=usb-fsl-ehci.0-1/input2
S: Sysfs=/devices/platform/fsl-ehci.0/usb1/1-1/1-1:1.2/input/input16
U: Uniq=
H: Handlers=kbd event4
B: PROP=0
B: EV=120013
B: KEY=e080ffdf 1cfffff ffffffff fffffffe
B: MSC=10
B: LED=1f


Explanation for the bitmasked EV field here:
https://unix.stackexchange.com/quest...t-devices-data
eruditionastic is offline   Reply With Quote