Nicholas Salsbury
Nicholas Salsbury

Reputation: 11

mapping dual identical touchscreens on linux

I need to automate touchscreen mapping. In xinput, the names are the same. So mapping by name is unrealistic. also in xinput, the ID's are subject to change depending on what is plugged into the system's USB ports. So there is no reliable mapping by ID.

A great solution would be if there is any way to change the names of one of these devices, so they were unique

I tried to make a little script, but I am in no way a programmer, and I feel there is a much better solution out there.

https://pastebin.com/NPnSFazM

Any help would be greatly appreciated

AT7:/opt/koronaposj/scripts> xinput
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ILITEK ILITEK-TP                          id=10   [slave  pointer  (2)]
⎜   ↳ ILITEK ILITEK-TP Mouse                    id=11   [slave  pointer  (2)]
⎜   ↳ ILITEK ILITEK-TP                          id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]

Upvotes: 1

Views: 205

Answers (0)

Related Questions