For complex gestures involving multiple fingers, use the PointerMatrix API to define points and then inject them via the Driver.
- Create a matrix: Use
PointerMatrix.create(fingerCount, pointCount). - Set points: Use
PointerMatrix.setPoint(index, pointIndex, {x, y}) to define the coordinates for each finger. - Inject action: Use
Driver.injectMultiPointerAction(pointerMatrixId, duration) to execute the gesture.
// 1. Create matrix with 1 finger and 104 points
// API: PointerMatrix.create(fingerCount, pointCount)
// Result: "PointerMatrix#0"
// 2. Set points
// API: PointerMatrix.setPoint(fingerIndex, pointIndex, {x, y})
// PointerMatrix.setPoint(0, 0, {"x": 65536630, "y": 984})
// 3. Inject
// API: Driver.injectMultiPointerAction(matrixId, duration)
// Driver.injectMultiPointerAction("PointerMatrix#0", 2000)