tapwithus/tap-python-sdk/tap-dpad
Claude Code and agent skill by tapwithus/tap-python-sdk
- community
Checking that the SKILL.md file is still in the repository.
Build a D-Pad style controller with a Tap - 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.
Install
npx vskill@latest install tapwithus/tap-python-sdk/tap-dpadSKILL.md
D-Pad (swipe, pinch, hold to rotate or drag)
Needs the TapXR developer firmware or TapBand: air gestures and IMU motion. TapBand uses the same BLE API and is coming soon. This is the same interaction as the D-Pad page in the TAP_EV sandbox (https://tapwithus.github.io/TAP_EV/).
Interaction
| User does | Codes | Event | |
|---|---|---|---|
| Swipe left / right / up / down | 101-104 | ("direction", "left") ... | |
| Short pinch thumb + index / middle / ring / pinky | 105-108 (AB-AE) | ("pinch", 0..3) (only when nothing is held) | |
| Hold a pinch | 110-113 | ("hold", i), mode pending | |
| ...and twist 25° or more within 1 s | IMU roll | ("mode", "rotate"), then ("rotate", degrees) | |
| ...and do not twist | - | after 1 s ("mode", "drag"), then ("drag", dx, dy) | |
| Relax the hand | 4 x 100 (NONE) | ("release", i): snap back or drop the item | |
| Hold a fist | 114 | ("hide",); then 2 x NONE gives ("show",) |
Repeats of the same code within 40 ms are ignored (gesture packets stream continuously).
Use the template
Copy scripts/dpad.py. It has:
DpadStateMachine: pure logic, no Bluetooth. All methods takenowin seconds (time.monotonic()) and return a list of event tuples.on_gesture(code, now): feed air-gesture codes.on_motion(dx, dy, roll, now): feed IMU motion.tick(now): optional; locks drag mode on time if motion packets stop.held,mode,hidden: current state for drawing the UI.main(): connects, checks forset_feature, enables features, prints events, and buzzes on hold / mode lock / pinch.
Required device setup (after await sdk.start()):
Tuning
| Argument | Default | Effect | |
|---|---|---|---|
rotate_lock_deg | 25 | Roll travel needed to choose rotate. Raise it if drag is chosen too rarely. | |
lock_window_s | 1.0 | Time to decide between rotate and drag. | |
release_after | 4 | NONE packets before release. | |
show_after | 2 | NONE packets after a fist before showing again. | |
debounce_s | 0.040 | Ignore repeats of the same code in this window. |
dragdeltas are raw device units. Multiply by a gain (TAP_EV uses about 0.45 px per unit) and clamp to the screen.rotategives degrees relative to the start of the hold. TAP_EV multiplies by 1.8 for a stronger visual turn.- If a drag should not stay after release, snap the item back on
("release", i)(TAP_EV does this).
Ideas
- Browser game: 4 shapes, each selected by its pinch; hold to rotate or move it. Use the WebSocket bridge from
tap-build-an-app. - Menu: swipes move focus in a grid, pinch AB = OK, pinch AC = back, fist = close.
- Photo viewer: swipes = next / previous, hold + twist = rotate, hold + drag = pan.
See also tap-knob (hold + twist for values) and tap-vision-models (all gesture codes).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/tap-python-sdk/skills/tap-dpad/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tapwithus/tap-python-sdk/tap-dpad)