Raising manipulation touch events (e.g. swipe, pinch, rotate) at the windows 11 OS level

Viewed 27

I would like to raise certain touch events at specific locations on the screen in windows 11. Ideally I'd do this through python or something python can bind to easily. I don't want to handle touch events, and I don't want to raise them within and application. Ideally there would be an API so I could swipe(start,stop) or pinch_in(center,edges,speed) or something like that.

Looking through some of the windows documentation I see that there is an API for DirectManipulation which looks a bit like what I'm looking for. Here's the windows 32 API docs: https://docs.microsoft.com/en-us/windows/win32/api/directmanipulation/ne-directmanipulation-directmanipulation_interaction_type

For instance there is an enum called DIRECTMANIPULATION_INTERACTION_TYPE where I could set the value to DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_PINCH_ZOOM for a certain kind of event. But I'm unsure how to raise these events to the OS. I tried to poke around at the directmanipulation.dll but that didn't immediately help.

Is there a well practiced way to raise touch events to the OS from within python?

0 Answers
Related