Pointing Processor
The PointingProcessor converts raw sensor motion events into HID mouse reports (or caret key taps). Four modes are available, switched via a processor in your configuration.
Modes
Cursor
Maps X/Y deltas directly to mouse cursor movement with optional scaling.
Formula: output = delta * multiplier. No accumulator and no divisor — every sample is processed immediately. Small movements are never swallowed, which is exactly what you want for cursor tracking.
Scroll
Maps X to horizontal pan and Y to vertical wheel scrolling.
Uses the MotionAccumulator: total = remainder + delta * multiplier, then output = total / divisor. The remainder (the part that didn't produce output) is kept for the next sample. Without this, small deltas like 3 with divisor=8 would always produce 0 and the sensor would feel dead.
Sniper
Maps X/Y to cursor at reduced sensitivity for precision aiming.
Uses the same MotionAccumulator as Scroll mode.
Caret
Maps X/Y to arrow key taps (up/down/left/right). No mouse report is generated.
Uses MotionAccumulator in persistent mode: total = remainder + delta, output = total / divisor, but the full total stays in the accumulator (not just the remainder). The consumer (caret logic) decides when to reset the accumulator via reset_x()/reset_y() after a tap has been triggered.
Caret mode currently gets rid of all pressed modifiers (shift, CTRL) and sends the bare HidKeyCode.
Mode switching
Users can define a processor, in this case called PointingProcessorController, which subscribes to events (e.g. layer changes) and updates the active mode. The example below switches to Cursor on layer 0, Sniper on layer 1, Scroll on layer 2, and Caret on layer 3 or when key bound to User0 is pressed:
Register the controller on the central side (always — even if the sensor is on a peripheral):