tapkit-motion
/tapkit-motion
Use TAP hand motion from moused velocities and tapDidChangeOrientation roll, pitch, and yaw to move a cursor, tilt, or rotate. Use for air mouse, pointer, cursor, AssistiveTouch, or orientation.
- Author
- tapwithus ↗
- Repository
- tap-ios-sdk ↗
- Licence
- Apache-2.0
- Last repository change
- 21.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 21.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Use TAP hand motion from moused velocities and tapDidChangeOrientation roll, pitch, and yaw to move a cursor, tilt, or rotate. Use for air mouse, pointer, cursor, AssistiveTouch, or orientation.
Original author description
Use TAP hand motion from moused velocities and tapDidChangeOrientation roll, pitch, and yaw to move a cursor, tilt, or rotate. Use for air mouse, pointer, cursor, AssistiveTouch, or orientation.
How it works
- Enable
- Pointer deltas
- Orientation
- Patterns
- Docs
SKILL.md preview
---
name: tapkit-motion
description: Use TAP hand motion from moused velocities and tapDidChangeOrientation roll, pitch, and yaw to move a cursor, tilt, or rotate. Use for air mouse, pointer, cursor, AssistiveTouch, or orientation.
---
# Motion and air mouse
Start from `tapkit-getting-started`. Motion and taps can be on together.
## Enable
```swift
TAPKit.sharedKit.setTAPInputMode(.controller(), forIdentifiers: nil)
TAPKit.sharedKit.setTAPXRState(.airMouse(), forIdentifiers: nil) // TapXR and TapBand
```
If `TAPXRState` is not set, turn the stream on:
```swift
TAPKit.sharedKit.setFeature(.imuMotionData, enabled: true, forIdentifiers: [identifier])
```
Turn it off with `setFeature(.imuMotionData, enabled: false, ...)` when the screen does not need motion, to save battery. A later `setTAPInputMode(.controller())` turns it back on.
`TAPInputMode.controllerWithMouseHID()` also drives the iOS AssistiveTouch cursor (iOS 13+, Accessibility settings). The app still receives `moused`.
## Pointer deltas
```swift
func moused(identifier: String, velocityX: Int16, velocityY: Int16, isMouse: Bool) {
guard isMouse else { return } // false is an idle / zero packet
cursor.x += CGFloat(velocityX) * gain
cursor.y += CGFloat(velocityY) * gain
}
```
- `velocityX` and `velocityY` are signed deltas since the last packet. Scale them in the app.
- `isMouse == false` means "not a pointer move". Skip it or you will fight idle packets.
- There is no fixed packet rate. If timing matters, measure it.
## Orientation
```swift
func tapDidChangeOrientation(roll: Int, pitch: Int, yaw: Int) {
// degrees
}
```
This callback does **not** include a device identifier. With two Taps connected, the app cannot tell which hand moved. Track one device, or keep the last `moused` identifier only as a hint (it is not guaranteed to match).
- `roll`, `pitch`, `yaw` are signed degrees.
- Do not treat absolute roll as a dial. Store the roll when the gesture starts (a `DragIndex` grab, see `tapkit-knob`) and use the delta. Roll wraps at ±180.
- Tap Strap mouse packets may omit useful euler angles. Use raw IMU (`tapkit-raw-sensors`) when you need orientation from a Tap Strap.
## Patterns
**Clamp a cursor** inside the view bounds. Add a dead zone so a still hand does not drift: ignore the sample when `abs(velocityX) + abs(velocityY) < 2`.
**Smooth** a noisy angle with an exponential average:
```swift
smooth = alpha * value + (1 - alpha) * smooth // alpha around 0.3
```
**System cursor:** `controllerWithMouseHID()` plus AssistiveTouch. The app does not draw that cursor.
If a direction is mirrored on the user's device, flip the sign and ask them to try again.
## Docs
- `moused` and `tapDidChangeOrientation`: `README.md` in the SDK repository
- Combining motion with pinch-hold: `tapkit-knob`, `tapkit-dpad`
Versions
The database has no other skills named tapkit-motion.
Database snapshot: 13.11.2026 · package version e08ccd099933 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Similar skills
- 100tap-imu-motion
Use Tap hand motion - IMU motion data (dx, dy, roll, pitch, yaw) and mouse events - to move a cursor, steer, tilt, or rotate things. Use for air mouse, pointer, cursor control, tilt, orientation, euler angles, roll/pitch/yaw, or motion-driven UI. - 100tap-android-imu-motion
Use Tap hand motion on Android — ImuMotionPacket (dx, dy, roll, pitch, yaw) on the framed protocol and MousePacket on classic firmware — to move a cursor, steer, tilt, or rotate. Use for air mouse, pointer, cursor, tilt, euler angles, or motion-driven UI. Requires… - 100tapkit-ios-sdk
Integrate and use TAPKit, the TAP iOS SDK, to receive input from TAP Bluetooth devices (Tap Strap, TapXR, TapBand): finger-tap combinations, air-mouse movement, air gestures, raw sensor streams, haptics, and TapXR / TapBand device configuration. Use when writing… - 100tapkit-getting-started
First skill for any TAP iOS app. The order is add TAPKit and NSBluetoothAlwaysUsageDescription, pair the Tap in Settings, addDelegate, setDefaultTAPInputMode (and setDefaultTAPXRState for TapXR), then start(). start() alone delivers no taps. Use for adding the SDK, pairing,… - 100attitude-controller-planner
Use this skill when implementing the inner control loop for a quadrotor — attitude (roll/pitch/yaw) PID control and attitude planning (converting desired acceleration to desired Euler angles). Covers gain layout, integral reset pattern, and the attitude planner inverse kinematics. - 87godot-first-person-controller
First-person CharacterBody3D player in Godot 4.6 — yaw the body / pitch a child Head holding a perspective eye-camera, raw mouse-look, camera-relative WASD, gravity from ProjectSettings, jump on is_on_floor, plus flat sprint (hold-to-run speed multiplier), crouch (hold-to-lower…