First, list all input sources with xinput --list
:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Sony Vaio Jogdial id=8 [slave pointer (2)]
⎜ ↳ Advanced Silicon S.A CoolTouch(TM) System id=11 [slave pointer (2)]
⎜ ↳ HID-compliant Mouse HID-compliant Mouse id=13 [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)]
↳ Sony Vaio Keys id=7 [slave keyboard (3)]
↳ Video Bus id=9 [slave keyboard (3)]
↳ Power Button id=10 [slave keyboard (3)]
↳ IR camera id=12 [slave keyboard (3)]
↳ Cherry USB keyboard id=14 [slave keyboard (3)]
↳ Cherry USB keyboard id=15 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=16 [slave keyboard (3)]
Take the device that interests you (in this case, I am using "Advanced Silicon S.A CoolTouch(TM) System"), and note its ID.
Now, you need to find out the display that you want to map the input device to. The most straight-forward way is to use xrandr
:
Screen 0: minimum 8 x 8, current 3200 x 1080, maximum 16384 x 16384
HDMI-0 connected 1280x1024+1920+0 (normal left inverted right x axis y axis) 338mm x 270mm
1280x1024 60.02*+
1280x960 60.00
1280x720 60.00 59.94
1152x864 75.00 70.00
1024x768 60.00
800x600 60.32
720x480 59.94
640x480 59.94 59.93
LVDS-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 299mm
1920x1080 60.00*+ 59.94
In this case, I want to map my touch device to the output LVDS-0
.
Combine the ID from the first step (11
here) with the screen name from the second step (LVDS-0
here) and run this command:
xinput --map-to-output INPUT-ID SCREEN
In my example, this command would be:
xinput --map-to-output 11 LVDS-0
Your touch device should not be properly mapped to the input device and should not require any additional configuration.
These settings will not persist between reboots. Please see this question on how to make xinput
commands persistent.