TAP

Get a tap callback in five minutes

One path. Pair the Tap, install Python, connect, enter Controller mode, and print a finger combination. When you see a tapcode in the terminal, you are done.

  1. Pair the Tap
  2. Install the Python SDK
  3. Connect
  4. Switch to Controller mode
  5. Print the first tap
SourceTapWithUs/tap-python-sdk
PyPItap-python-sdk
Importtapsdk
StatusBeta · Python ≥ 3.9

1. Pair the Tap

Put the Tap Strap in pairing mode and pair it in your OS Bluetooth settings (macOS, Windows, or Linux). The SDK does not scan for an unpaired device — it attaches to a Tap the OS already knows.

Hardware help: Tap Strap quick start.

2. Install the Python SDK

Python is the fastest first win on a laptop. Requires Python 3.9+. Package name tap-python-sdk, import name tapsdk.

terminal
pip install tap-python-sdk

Mobile or browser stacks later: iOS, Android, Web.

3. Connect

After pairing, await connect() returns a TapSDK (v1 / classic Tap Strap) or TapSDK2 (v2 framed firmware). Register callbacks, then await sdk.start() to arm notifications. The full script is in step 5.

4. Switch to Controller mode

NOTETap boots in Text mode — a HID keyboard. You get ZERO tap callbacks until you switch to Controller mode. Switch back to Text when your app backgrounds so the user keeps a working keyboard.

On v1 (TapSDK), call await sdk.set_input_mode(InputModeController()) after start(). That is what unlocks app-bound tap events.

5. Print the first tap

Each tap is a combination bitmask 1…31: bit0 = thumb … bit4 = pinky. Example: 50b00101 → thumb + middle.

Copy this script, run python hello_tap.py, then tap:

hello_tap.py
import asyncio
from tapsdk import InputModeController, TapSDK, connect


def on_tap(identifier, tapcode):
    # tapcode is int 1..31 — bit0=thumb … bit4=pinky
    print(f"{identifier} tapped {tapcode} (0b{int(tapcode):05b})")


async def main():
    # Pair in OS Bluetooth settings first — do not expect a cold unpaired scan.
    sdk = await connect()
    assert isinstance(sdk, TapSDK), (
        "Expected v1 TapSDK (classic Tap Strap). "
        "If connect() returned TapSDK2, see /docs/python/ for the v2 path."
    )

    sdk.register_tap_events(on_tap)
    await sdk.start()
    await sdk.set_input_mode(InputModeController())

    print("Controller mode on. Waiting for taps… (Ctrl+C to quit)")
    await asyncio.Event().wait()


if __name__ == "__main__":
    asyncio.run(main())

You should see lines like … tapped 5 (0b00101). That is the first win. Next: How Tap works or the full Python SDK guide.

Browser path: Web SDK.