I have a touchscreen laptop and I want to hide the pointer whenever I touch the screen. I am aware of solutions like unclutter and startx -nocursor
but I want the pointer to hide/show dynamically, hiding if I use the touchscreen and showing when I use a hardware mouse.
I thought about making two separate pointers and applying one of the two above solutions to the touchscreen pointer, but neither of those solutions mention how to target a single pointer, and having multiple pointers makes things act weird, and that wouldn't hide the hardware mouse cursor.
I figure I can most reasonably do this doing something like this, keeping track of the current input mechanism and executing xinput -cursor [transparent cursor]
whenever the touchscreen is used and xinput -cursor [normal cursor]
whenever a normal mouse is used.
I looked at xinput though and it looks like since both the hardware mouse and touchscreen are slaved to the same pointer, both of them register the same events in xev so I'm not really sure where I would get the information needed to differentiate a touch from a mouseclick. is it possible?