I'd first double-check how your input device is actually reporting that, as it's not uncommon for some to do completely wonky shit if they're not designed to deal with that properly (which, on Linux, would be reporting a single touch event with auxiliary info indicating a larger oval shape for the contact)

.
But to answer your actual question:
https://github.com/koreader/koreader...ector.lua#L117