Is there a way to identify that a touchscreen has been mapped/limited to a display?

Steps I'm using to map:

  1. xrandr --query to get the display name
  2. xinput list to see all the slave devices on the virtual pointer
  3. xinput --list-props {device_id} to get the device node
  4. udevadm info --query=property --name={device_node} to check if a property says ID_INPUT_TOUCHSCREEN=1
  5. xinput map-to-output {device_id} {display_name} to map/limit touchscreen input to a single monitor

If I walked up to a machine that has had these steps performed, how can I verify that the input from device_id was mapped to display_name? Or where can I see that input from device_id is limited to screen area X,Y,W,H?

Thanks, -Pottenger


xinput list-props {device_id} shows all device properties that can be changed and current values.

Check for a property named Coordinate Transformation Matrix that has a non-default set of 9 float numbers as a value. The --map-to-output parameter calculates the CTM for you and sets that property.


Coordinate Transformation Matrix (157): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000

After map-to-output example:

Coordinate Transformation Matrix (157): 0.533333, 0.000000, 0.000000, 0.000000, 0.878049, 0.121951, 0.000000, 0.000000, 1.000000
| improve this answer | |
  • 1
    Thanks! For anyone trying to associate back to the original display you can: -Multiply the screen 0: current {W} x {H} by the CTM's scaling factor (the 3x3 matrix diagonal) to get the corresponding display's resolution. -Multiple the screen 0: current {W} x {H} by the CTM's translation (the 3x3 matrix last column) to get the corresponding display's positional offset (in the case you have multiple with the same resolution.) – Spottenger Jan 25 '19 at 18:22

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.