3

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?

Quintin Balsdon
  • 681
  • 5
  • 19
ThanhLe
  • 311
  • 3
  • 8

2 Answers2

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.

Dmitry Grigoryev
  • 27,918
  • 6
  • 53
  • 144
1

install:

apt install input-utils

and issue

lsinput

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

sparkie
  • 435
  • 3
  • 9