setup calibre development environmnet as decribed in manual:
https://manual.calibre-ebook.com/develop.html
then make changes to touch.pyj to debug what is going on. You can add some print(whatever) to the code and it will show up in the console. Look in BookTouchHandler and interpret_single_gesture