Hmm. The autocomplete is ‘wrong’ because the JS type is ‘number’ and there’s no direct analog for that in Python (JS numbers are effectively doubles, but more often than not used as integers).
That said, a quick test on my (non touchscreen) device gave me a float value for pressure when I clicked, so I don’t think the underlying mechanism is wrong here:
{
"altKey": false,
"bubbles": true,
"button": 0,
"buttons": 1,
"cancelable": true,
"clientX": 512,
"clientY": 163,
"ctrlKey": false,
"defaultPrevented": false,
"detail": 0,
"eventPhase": 3,
"height": 1,
"isPrimary": true,
"isTrusted": true,
"metaKey": false,
"movementX": 0,
"movementY": 0,
"pageX": 512,
"pageY": 163,
"pointerId": 1,
"pointerType": "mouse",
"pressure": 0.5,
"screenX": 960,
"screenY": 247,
"shiftKey": false,
"tangentialPressure": 0,
"tiltX": 0,
"tiltY": 0,
"timeStamp": 241849.3999999985,
"twist": 0,
"type": "pointerdown",
"width": 1
}
Can you test on different hardware? Can you confirm that the pressure
property is set on the websocket message sent from the frontend to the backend (via browser devtools, you can watch the traffic)?