When I put my finger on a tablet, the button number 0 is up (1) and when I take it off, button is “down” (0). 1 and 0 behave as expected, but up and down logic is confusing. I’d rename word “button” to “control” a changed “up/down” status to “active”.
Yep the reserve for pressure makes sense, but the coordinates are also interpreted as having a max value of 32768, not 65536. This is because the server code interprets these values as signed shorts, not unsigned shorts, and uses SHRT_MAX as the maximum to normalize with, not USHRT_MAX.
Indeed, it should interpret the values as an unsigned short and normalize to USHRT_MAX/2.