I'm trying to write an addon to customize the trackpad panning, zoomimg, and rotating gestures, but can't find a way to read the actual trackpad parameters for position and so on. The properties in the event structure (mouse_prev_x/y, mouse_x/y, mouse_region_x/y) shows the current pointer position which happens to be standing still on the screen.
This is the addon that I'm talking about:
There are no examples on the web for handling the TRACKPADPAN event.
The class bpy.types.Event is the one that is supposed to have the relevant parameters to retrieve from the TRACKPADPAN event, that is what I'm guessing from the documentation.
This snippet of code in particular, from my add-on, printf to the info view that the trackpad event has nothing to do with the mouse coordinates that are available in bpy.types.Event
#....
def modal(self, context, event):
#....
if event.type == 'TRACKPADPAN':
self.report({'INFO'}, str(event.mouse_x))
#...
so i wonder if part of the disconnect is coming from the hardware/driver/desktop before blender handles the event data at all. for comparison, SDL doesn't have a primitive for trackpad pan, only down up and motion from which we could build our own pan event accumulator glue DIY
– ThorSummoner Jan 13 '24 at 08:17