/tapkit-ios-sdk:tapkit-tappingfrom tapkit-ios-sdk
Decodes TAP finger combinations into app actions, detects double taps, and provides haptic feedback. Use for finger combos, chords, in-app shortcuts, and multitap on Tap Strap, Tap Strap 2, TapXR, and TapBand.
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.
None: SKILL.md is the whole skill.
Works on Tap Strap, Tap Strap 2, TapXR, and TapBand. Start from tapkit-getting-started for the connect order.
combination in tapped is an integer 1–31. Each bit is one finger:
| Bit | Value | Finger |
|---|---|---|
| 0 | 1 | thumb |
| 1 | 2 | index |
| 2 | 4 | middle |
| 3 | 8 | ring |
| 4 | 16 | pinky |
Examples: 1 thumb, 2 index, 3 thumb+index, 6 index+middle, 31 all five.
func tapped(identifier: String, combination: UInt8, multitap: UInt8) {
let fingers = TAPCombination.toFingers(combination) // [Bool] thumb → pinky
switch combination {
case 2: goNext() // index
case 4: goPrevious() // middle
case 6: select() // index + middle
case 31: close() // all five
default: break
}
}
TAPCombination.fromFingers builds a bitmask. TAPCombination.combinationSpeakableString(for:) is a debug string.
Single-finger taps are the most reliable. Prefer them for frequent actions. Use two-finger combos next. Use three or more fingers only for rare actions.
multitap is 1–3 and reflects keyboard multitap state when the firmware sends it. It is not a double-tap detector. Detect double taps yourself (below).
TAPInputMode.controller() — default you want. Delivers tapped and moused.TAPInputMode.text() — the Tap is a Bluetooth keyboard. tapped and moused do not fire. Use this only when the user should type into a text field.TAPInputMode.controllerWithMouseHID() — controller callbacks plus the system AssistiveTouch cursor (iOS 13+).TAPInputMode.controllerWithFullHID() — full HID controller mode.TAPInputMode.tapHold() — short taps still arrive via tapped. Long presses arrive via tapHoldStarted / tapHoldEnded.TAPKit.sharedKit.setTAPInputMode(.controller(), forIdentifiers: nil)
TAPKit.sharedKit.setDefaultTAPInputMode(.controller(), immediate: true)
On TapXR and TapBand, also set TAPXRState.tapping() so the device stays in tapping rather than air-mouse. You can set the tapping vision model directly (see tapkit-air-gestures).
The SDK re-sends the current mode on a timer while the app is active, so the device stays in it.
The SDK reports every tap. Detect a double tap with a time window. If a single tap must not also fire, delay the single action until the window ends.
private var lastCode: UInt8?
private var lastTap = Date.distantPast
private var pending: DispatchWorkItem?
func tapped(identifier: String, combination: UInt8, multitap: UInt8) {
let now = Date()
if lastCode == combination, now.timeIntervalSince(lastTap) < 0.35 {
pending?.cancel()
handleDouble(combination)
lastCode = nil
return
}
lastCode = combination
lastTap = now
let work = DispatchWorkItem { [weak self] in self?.handleSingle(combination) }
pending = work
DispatchQueue.main.asyncAfter(deadline: .now() + 0.35, execute: work)
}
The SDK does not synthesize OS key presses. Two different jobs:
setTAPInputMode(.text(), forIdentifiers:). The Tap is the keyboard. Your delegate will not see those taps.combination in tapped.Do not add a library that injects global keystrokes. iOS apps cannot drive other apps that way.
TAPKit.sharedKit.vibrate(durations: [80], forIdentifiers: [identifier])
TAPKit.sharedKit.vibrate(durations: [100, 100, 100], forIdentifiers: nil) // on, pause, on
Values are milliseconds, quantized to 10 ms, maximum 18 values. nil identifiers vibrate every connected device. Delegate callbacks are already on the main queue, so call vibrate directly.
README.md in the SDK repositoryTAPKit-Example/ViewController.swiftWhat SKILL.md sets; muted values are Claude Code's defaults
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-knobBuild a virtual knob on TapXR or TapBand. A pinch-hold (DragIndex through DragPinky) grabs a value and wrist roll turns it up or down. Drop releases. Use for knob, dial, twist, volume, brightness, or continuous value control./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.Other plugins' skills for the same job