/tapkit-ios-sdk:tapkit-knobfrom tapkit-ios-sdk
Builds a virtual knob for TapXR/TapBand using pinch-hold and wrist roll gestures. Each finger controls a separate value. Useful for volume, brightness, or continuous value control.
Ships in tapkit-ios-sdk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
TapXR (current developer firmware) and TapBand. It needs processed air-gesture holds and IMU roll. Tap Strap does not emit Drag* / Drop plus orientation together. Same idea as the Knob in the TAP_EV sandbox (https://tapwithus.github.io/TAP_EV/). TapBand is coming soon, same BLE API: https://www.tapwithus.com/tapband-waitlist/
tapXRAirGestured fires once with DragIndex, DragMiddle, DragRing, or DragPinky (raw 5–8). That grabs a knob. Each finger is its own knob, so one hand controls four values.tapDidChangeOrientation roll turns the knob. The roll at the next sample after the grab is the reference. Every stepDegrees of roll away from it is one step.Drop (raw 9). That releases the knob.iOS does not deliver the repeating raw firmware class indexes (100–114) on this callback. TAPKit has already turned that stream into one drag edge and one drop edge, so there is nothing to debounce and no run of "none" packets to count. See tapkit-air-gestures for the raw table and the processed layer.
stateDiagram-v2
idle --> grabbed: DragIndex..DragPinky
grabbed --> grabbed: roll delta >= stepDegrees gives +/- steps
grabbed --> idle: Drop
Copy scripts/KnobTracker.swift. It has no Bluetooth in it. TAPKit-Example compiles that same file into the Knob / D-Pad screen (GestureSampleViewController). The example target is Swift 4, and the script stays on that syntax.
onGesture(rawValue) returns "start", "release", or nil. Pass gesture.rawValue from tapXRAirGestured.onRoll(roll) returns signed steps, or 0 when idle. Pass roll from tapDidChangeOrientation.active is the knob index 0–3 (index, middle, ring, pinky pinch) or nil.Required device setup, after start() and tapConnected:
let ids = [identifier]
TAPKit.sharedKit.setTAPInputMode(.controller(), forIdentifiers: ids)
TAPKit.sharedKit.setFeature(.modelDetection, enabled: true, forIdentifiers: ids)
TAPKit.sharedKit.setFeature(.imuMotionData, enabled: true, forIdentifiers: ids)
TAPKit.sharedKit.setVisionSensorModel(.airGesture, forIdentifiers: ids)
TAPKit.sharedKit.setVisionSensorOpMode(.stream, forIdentifiers: ids)
On TapXR and TapBand, setTAPXRState(.airMouse(), forIdentifiers: ids) with controller mode is the shorter path. It selects the air-gesture model and leaves IMU motion on.
Wiring:
func tapXRAirGestured(identifier: String, gesture: TAPXRAirGesture) {
switch knob.onGesture(gesture.rawValue) {
case "start":
TAPKit.sharedKit.vibrate(durations: [40], forIdentifiers: [identifier])
case "release":
break
default:
break
}
}
func tapDidChangeOrientation(roll: Int, pitch: Int, yaw: Int) {
let steps = knob.onRoll(Double(roll))
guard steps != 0, let index = knob.active else { return }
values[index] = min(100, max(0, values[index] + steps))
}
tapDidChangeOrientation has no identifier. Use one Tap for a knob screen.
| Setting | Default | Effect |
|---|---|---|
stepDegrees | 2 | Degrees of roll per step. Larger is slower and more precise. 1–2 for a fine value, 5–10 for menu items. |
-steps.vibrate(durations: [40])). Do not buzz on every step.KnobTracker.wrapDegrees uses the short arc, so crossing the wrap is a few degrees, not a jump of about 360.stepDegrees = 8.See also tapkit-dpad (pinch-hold that chooses rotate or drag) and tapkit-air-gestures.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tapwithus/tap-ios-sdk --plugin tapkit-ios-sdk8 skills in this plugin
/tapkit-air-gesturesHandle TAPXRAirGesture (processed click, drag, drop, fist, swipe) on TapXR and TapBand, document raw firmware class indexes, switch tapping vs air-gesture models, and handle Tap Strap TAPAirGesture. Use for air gestures, pinch, swipe, fist, TAPXRState, or raw detections./tapkit-build-an-appBuild a complete iOS app or interactive experience controlled by a TAP device. Use when the user asks to build, make, or create something with their Tap, including games, presentations, media control, or creative tools./tapkit-dpadBuild a D-Pad style controller on TapXR or TapBand. Swipes move, short clicks select, a pinch-hold locks into rotate or drag, and a fist hides. Use for menus, select and move, drag, rotate, or game controls./tapkit-getting-startedFirst 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, connecting, setup, or no tap events./tapkit-motionUse 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./tapkit-raw-sensorsStream raw accelerometer and gyroscope samples with TAPInputMode.rawSensor or TAPInputMode.v2Debug(), and set sensitivity with named enums. Use for raw sensors, raw IMU, accelerometer, gyro, logging, or custom gesture recognition.Other plugins' skills for the same job