jw3 / harvest17

0 stars 0 forks source link

Lock touchscreen to device #41

Closed jw3 closed 7 years ago

jw3 commented 7 years ago

When a keyboard is connected the touchscreen will be different input dev. Should be able to lock touch to a constant dev entry.

jw3 commented 7 years ago
pi@2PiBP1 /etc/udev/rules.d $ cat 95-touch.rules 
SUBSYSTEM=="input", ATTRS{name}=="FT5406 memory based driver", ENV{DEVNAME}=="*event*", SYMLINK+="input/by-id/FT5406-events-touch" 
pi@2PiBP1 /etc/udev/rules.d $ 
pi@2PiBP1 /etc/udev/rules.d $ ls -l /dev/input/by-id
total 0
lrwxrwxrwx 1 root root 9 Mar  4 13:10 FT5406-events-touch -> ../event2
lrwxrwxrwx 1 root root 9 Mar  4 13:10 usb-CHICONY_HP_USB_Multimedia_Keyboard-event-if01 -> ../event1
lrwxrwxrwx 1 root root 9 Mar  4 13:10 usb-CHICONY_HP_USB_Multimedia_Keyboard-event-kbd -> ../event0
pi@2PiBP1 /etc/udev/rules.d $ 

https://www.raspberrypi.org/forums/viewtopic.php?f=108&t=120690

also

/etc/udev/rules.d/95-rpi-lcd.rules 
# N: Name="FT5406 memory based driver"  -- Offical rpi touch screen lcd
SUBSYSTEM=="input", ATTRS{name}=="FT5406 memory based driver", ENV{DEVNAME}=="*event*", SYMLINK+="input/touchscreen-rpi-lcd"
KERNEL=="event*",ATTRS{name}=="FT5406 memory based driver",SYMLINK+="twofingtouch",MODE="0440"

https://www.element14.com/community/thread/49875/l/7-touchscreen-display-rpi-3-right-click-long-click?displayFullThread=true http://reactivated.net/writing_udev_rules.html