/tap-web-sdk:tap-tappingfrom tap-web-sdk
Decode Tap tapcodes (which fingers tapped), map finger combinations to in-page actions, and give haptic feedback. Use for tapping, finger combos, chords, tap-to-action, shortcuts, InputModeController, or the TAPPING vision model.
Ships in tap-web-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 TapSDKWeb and TapSDKWeb2. Start from the tap-getting-started skill for connection.
A tapcode is an int 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.
const FINGERS = ['thumb', 'index', 'middle', 'ring', 'pinky'];
function first(value: number | number[]): number {
return Array.isArray(value) ? value[0] : value;
}
function fingers(tapcode: number): string[] {
return FINGERS.filter((_, bit) => tapcode & (1 << bit));
}
const ACTIONS: Record<number, string> = {
2: 'next', // index
4: 'previous', // middle
6: 'select', // index + middle
31: 'quit', // all fingers
};
function onTap(_identifier: string, tapcode: number | number[]): void {
const action = ACTIONS[first(tapcode)];
if (action) {
handle(action);
}
}
Single-finger taps are the most reliable. Prefer them for frequent actions. Use 2-finger combos next. Use 3+ finger combos only for rare actions.
TapSDKWeb: await sdk.setInputMode(new InputModeController()) after you register callbacks. connect() already started notifications. There is no start().
new InputModeText() (default): the Tap types letters into the focused field. The SDK gets no taps.new InputModeController(): the SDK gets tap, mouse, and air-gesture events. No typing.new InputModeControllerText(): both at the same time.TapSDKWeb2: setFeature(DeviceFeatures.MODEL_DETECTION, true), setVisionSensorModel(ModelTypes.TAPPING), setVisionSensorOpMode(VisionSensorOpModes.TRIGGER).The SDK reports every tap. Detect double taps yourself with a time window:
const last = { code: null as number | null, t: 0 };
function onTap(_identifier: string, tapcode: number | number[]): void {
const code = first(tapcode);
const now = performance.now();
if (code === last.code && now - last.t < 350) {
handleDouble(code);
last.code = null;
return;
}
last.code = code;
last.t = now;
handleSingle(code);
}
If single and double must not both fire, delay the single action until the window ends (setTimeout for 350 ms) and clear that timer on the second tap.
The page cannot press keys in other apps. Map taps to functions in this page, and use the same functions for keyboard fallback:
const ACTIONS: Record<number, () => void> = {
2: () => goNext(),
4: () => goPrevious(),
6: () => select(),
};
function onTap(_identifier: string, tapcode: number | number[]): void {
ACTIONS[first(tapcode)]?.();
}
await sdk.sendVibrationSequence([80]); // short buzz
await sdk.sendVibrationSequence([100, 100, 100]); // double buzz
Values are on/off durations in ms (10-2550, max 18 values). From a callback, do not await: void sdk.sendVibrationSequence([80]).
src/enumerations.ts in this repositoryWhat SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/tap-build-an-appBuild a complete browser app or interactive experience controlled by a Tap - games, pages, presentations, or creative tools. Use when the user asks to build, make, or create something with their Tap, especially if they are not a developer./tap-dpadBuild a D-Pad style controller with TapSDKWeb2 - swipes for directions, short pinches to select, pinch-hold that locks into rotate (twist) or drag (move) mode, fist-hold to hide. Use for D-Pad, menu navigation, select and move, drag and drop, rotate objects, or game controls with gestures./tap-getting-startedFirst skill for any Tap web app. Call connect() from a button click, then register callbacks, then enable input. connect() starts notifications. There is no start(). Use for install, connect to my Tap, setup, or no tap events.Other plugins' skills for the same job
npx claudepluginhub tapwithus/tap-web-sdk --plugin tap-web-sdk