I am using 7Inch HDMI Touch Display with RPI zero.

I want to pass the pixel data ( or anything else related ) where touch is sensed to another device.

I could not find related information.

Is it even possible ? Any blog or something will do too. Thank you.

  • what is the actual problem? ... you described three or more separate, unrelated functions in your question
    – jsotola
    Commented Oct 31, 2021 at 18:14
  • I just want touch pixels, where user touched.
    – dharmikP
    Commented Nov 1, 2021 at 5:51
  • so, what is stopping you?
    – jsotola
    Commented Nov 1, 2021 at 7:08
  • I could not find how to do that. One way I get this is by using GUI. When you touch anywhere it just give you mouser poiter data. But how to get raw data directly from display ?
    – dharmikP
    Commented Nov 2, 2021 at 7:37
  • Mouse* pointer* I mean sorry for this
    – dharmikP
    Commented Nov 2, 2021 at 7:38

1 Answer 1


A touchscreen has no relation to the display it is attached to, and has no concept of pixels. Its driver receives analog signals from the matrix and produces X and Y coordinates which are float values between 0 and 1, and sometimes (depending on the device type and the driver) a byte encoding the pressure. If you know the underlying screen resolution, you can convert X and Y coordinates to pixels.

You can read "raw" touchscreen data using libinput. You will get a new input event every time the coordinates (and the pressure) change.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.