Metadata-Version: 2.5
Name: proclick
Version: 0.1.0
Summary: Configure a Razer Pro Click Mini from macOS — DPI, polling rate, DPI stages, idle timeout — no Synapse needed
Project-URL: Homepage, https://github.com/Grynn/proclick
Project-URL: Issues, https://github.com/Grynn/proclick/issues
Author-email: Vishal Doshi <vishal.doshi@gmail.com>
License-Expression: GPL-2.0-or-later
License-File: LICENSE
Keywords: dpi,hid,macos,mouse,pro-click-mini,razer
Classifier: Environment :: Console
Classifier: Operating System :: MacOS
Classifier: Topic :: System :: Hardware
Requires-Python: >=3.9
Requires-Dist: hid>=1.0.5
Description-Content-Type: text/markdown

# proclick-mini — Razer Pro Click Mini control for macOS

Configure a **Razer Pro Click Mini** (RZ01-0399) from macOS without Synapse,
by speaking the Razer vendor HID protocol directly to the HyperSpeed 2.4 GHz
receiver. Protocol sourced from the [openrazer](https://github.com/openrazer/openrazer)
Linux driver (GPL-2.0), specifically [PR #2038](https://github.com/openrazer/openrazer/pull/2038)
which added this device.

## Usage

```bash
./proclick.py            # status: serial, firmware, battery, dpi, poll, stages
./proclick.py dpi 1600   # set tracking speed (100–12000, or `800x1600` for x/y)
./proclick.py poll 1000  # polling rate: 125 | 500 | 1000 Hz
./proclick.py stages 400,800,1600,3200 --active 3
./proclick.py idle 600   # sleep timeout, seconds (60–900)
```

Settings are written to the mouse's onboard memory (VARSTORE) — they persist
across reconnects and host reboots, so you can set-and-forget.

Requires: `brew install hidapi` and `uv` (script deps are inline).

## What this can't do: pointer acceleration curves

Acceleration is **not** a mouse-side setting — the mouse just reports counts at
its DPI; the *host* turns counts into pointer movement. Razer Synapse's accel
options are software running on the host, and macOS applies its own curve.
Options:

- [LinearMouse](https://linearmouse.app) (open source) — per-device custom
  acceleration curves, flat/linear mode, speed scaling. This is the right tool
  for the "acceleration curve" half of the problem.
- `defaults write -g com.apple.mouse.scaling -1` — kills macOS acceleration
  entirely (log out/in to apply).

Practical setup: pick a hardware DPI here (e.g. 1600), then shape the curve in
LinearMouse.

## Protocol notes (reverse-engineered, verified live 2026-08-18)

- Receiver: USB `1532:009A`, 5 HID interfaces. **Commands only work on
  interface 0** (the mouse boot interface, 90-byte feature reports).
  Interfaces 1–2 are keyboard interfaces macOS won't open without Input
  Monitoring; 3–4 accept feature reports but never answer.
- Transport: 90-byte feature report, report ID 0, on interface 0.
  Send SET_REPORT, then poll GET_REPORT until `status != 0x00` (the receiver
  round-trips to the mouse over 2.4 GHz, ~50 ms).
- Report layout: `[0] status · [1] transaction_id = 0x1F · [2:4] remaining ·
  [4] proto · [5] data_size · [6] class · [7] cmd · [8:88] args · [88] crc ·
  [89] reserved`; CRC = XOR of bytes 2..87.
- Status codes: `0x00` new/unprocessed · `0x01` busy · `0x02` OK ·
  `0x03` failure · `0x04` timeout · `0x05` not supported.
- Commands verified on this device (class/cmd, data_size):
  - `0x00/0x82` (0x16) get serial · `0x00/0x81` (0x02) get firmware
  - `0x07/0x80` (0x02) battery level (args[1]/255)
  - `0x04/0x85|0x05` (0x07) get/set DPI x,y (16-bit BE, args[0]=varstore)
  - `0x00/0x85|0x05` (0x01) get/set poll rate (0x01=1000, 0x02=500, 0x08=125)
  - `0x04/0x86|0x06` (0x26) get/set DPI stages (up to 5 × 7-byte entries)
  - `0x07/0x83|0x03` (0x02) get/set idle timeout seconds (16-bit BE)
  - `0x07/0x84` charging status → NOT_SUPPORTED on this device
