I used to have a old Hewlitt Packard “touchscreen” computer. Although the way the did it, was a grid of lightsensors (?) that went over the screen but was hidden in the frame. I actually don’t know specifically how it worked but that’s my guess since I was in middle school back when we got it.