Bounded pointer input

A touch surface can produce events faster than Bluetooth can send reports. The pipeline must preserve meaning without preserving an unlimited backlog.

Source baseline: app 1.0.0 (3) · 14 August 2026

Input boundary

The Compose control surface produces semantic requests—motion, button state, clicks, and horizontal scroll—rather than raw report bytes. A foreground service validates those requests and passes them to the shared HID session.

TransportClassic HID Device with BLE HOGP fallback
Report rangeEach relative motion component is segmented into signed 8-bit HID deltas
Queue modelBounded ingress, semantic, and pending-command capacities
Persistent stateVerified hosts and local control preferences

Motion coalescing without reordering

Pointer movement is coalesced while it remains adjacent. A button, click, or horizontal-scroll boundary flushes pending movement first, preventing the queue from moving a click ahead of the pointer position that selected its target.

Buttons, clicks, and wheels

Button state is represented as a three-button snapshot. A release for an already accepted press is priority work, because queue pressure must never leave the host button stuck down. Single and double clicks expand into deterministic down, report, hold, up, and gap commands.

GestureProtocol treatment
Single click60 ms held press followed by release
Double clickTwo clicks with a 100 ms inter-click gap
Vertical scrollMouse wheel in the relative mouse report
Horizontal scrollTemporary Shift modifier plus wheel, then restore the user's modifier mask

Session and lifecycle safety

The service owns the transport beyond one Activity frame and exposes connection state as flows. Verified hosts are kept in Android DataStore. The three Dotori HID apps coordinate signed-sibling ownership so only one active control surface claims the scarce device role.

Verification and known limits

Tests cover accumulator capacity, motion segmentation and dropping, button snapshots, click timing, horizontal-scroll modifier restoration, reconnect policy, sibling handoff, persistence fallback, and lifecycle routing.