0

I have a Pi4B with a fresh install of Raspbian. I have a 4" touch LCD on HDMI0, and a 13" non-touch portable monitor on HDMI1, and I configured the workspaces so they don't overlap. I enabled touch with the following changes in config.txt:

dtparam=spi=on
hdmi_cvt 480 800 60 6 0 0 0
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900

(i didn't do the full install as recommended on that link, as that kills my ability to use 2 screens - see my previous question)

However, when using the touch screen, each point is mapped to the whole workspace instead of just the LCD. In other words, if I hit the bottom right corner of the LCD, the Pi registers a click at the bottom right of the large screen.

It probably sounds a bit confusing so an image being worth 1000 words: enter image description here Red is (approximately) where I touch; green is where it registers.

Note that this isn't actually affected by whether the second screen is connected or not.

Anybody know what I need to fiddle with to solve it? I just want to use the touch screen for touch input.

1 Answer 1

0

xinput map-to-output <touch device ID> HDMI-1 did it for me.

Your Answer

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

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