2

I have a raspberry pi3 and one 7" official lcd and have code to get data from touch input, but when I plug a keyboard into the RPI the touch device is event2, and event0 when keyboard is unplugged. So how do I determine which event is represent for touch?

2

Look at /dev/input/by-id and /dev/input/by-path, or check out the output of lsinput, or

udevadm info --query=property --name=/dev/input/eventX

Note that xinput seems to use its own IDs which don't always correspond to /dev/input/eventX.

1

install:

apt install input-utils

and issue

lsinput

this will list all your input devices along with some information about each device

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.