Events¶
Callbacks are registered with TapSDK.register_* methods. They run on the asyncio / Bleak notification path — keep them short or schedule work onto another task.
Connection¶
Called after GATT notifications are started successfully.
Passed through to Bleak’s disconnected callback.
Tap¶
tapcode is an 8-bit value in 1–31. Bit 0 (LSb) is the thumb; bit 4 is the pinky. Example: 5 (0b00101) = thumb + middle.
While air-mouse mode is active, tapcodes 2 and 4 are remapped into air-gesture handling instead of the tap callback.
Mouse¶
vx / vy are signed velocities. proximity is True when a surface is detected.
Air gesture¶
gesture matches AirGestures.
Fired when the device reports mouse-mode changes (0x14 payload).
Raw sensors¶
Each dict:
| Key | Type | Description |
|---|---|---|
type |
str |
"imu" or "accl" |
ts |
int |
Device timestamp (ms) |
payload |
list |
Sample values (scaled or raw LSB) |