Looking for custom switch control

I ran across similar touch screen issues as I am working on a Rasp Pi5 project using a 7" Touch Screen. Check this thread " Pi Official 7” Touch Screen - some problems" for work around solutions.

I needed to add a driver and then after experimenting I made extensive use of DesktopLabel (Mouse Down returns true then Mouse UP to do whatever) and SubClass DesktopCanvas used for color changes.

Thanks to Pawel Soltysinski for sharing his experience and keyboard solution which I have modified several times for differnent keyboard needs. His solution actually presents some good ideas on how to implement touch screen on Rasp Pi and for that matter should work with comparable Linux platforms.