Skip to content

Razer keyboards: 67 more, read only - #66

Merged
hex-dump merged 2 commits into
mainfrom
feat/more-keyboards
Nov 17, 2026
Merged

hex-dump merged 2 commits into
mainfrom
feat/more-keyboards

Conversation

@hex-dump

Copy link
Copy Markdown
Owner

Adds 67 Razer keyboards, all read only, on top of the BlackWidow V4 Mini HyperSpeed we already had. That covers the BlackWidow line (2012 Ultimate through V4, V4 Pro, V4 75%, V4 X, the V4 Tenkeyless HyperSpeed models), Huntsman (Elite, TE, Mini, V2, V2 Analog, V3 Pro, V3 HE), Ornata, Cynosa, DeathStalker, Anansi and Joro. Wireless models are also covered through their own HyperSpeed receiver.

Where the ids and facts come from

tools/openrazer_facts.py --keyboards generates the table (razer_keyboard_models.rs) from OpenRazer at commit cd5c424 (GPL-2.0, facts only, read as text, no code copied), the same way the mouse table is built. For each keyboard it takes the interface of the reports, the wait, and the transaction ids of the battery, brightness and game mode reads. Laptops and keypads (Tartarus, Orbweaver, Nostromo) are left out, and so is any id another OpenRazer driver also claims.

What changes in the driver

  • It still only reads: firmware, layout, and where OpenRazer reads them on that model, the backlight brightness, the game mode and the battery.
  • The battery and game mode reads are optional now. A wired keyboard isn't asked for a battery it doesn't have, and the Huntsman V2 isn't asked for the game mode, because OpenRazer reads it from another storage there.
  • The older keyboards use the standard brightness read (03 83), which I added to the allowed list as a read. Every command in the list is still a read, and the catalog still marks the whole family read-only.

Linux

On Linux the udev rule still opens only the V4 Mini's interface 3. For most of the other keyboards, OpenRazer sends to interface 1, and its daemon also reads key presses from that interface. A rule that opened it would let any user process read what's typed. So the new keyboards are Access::Closed and PeriHub doesn't open them on Linux at all. The check is peripheral::opened_on_linux, which now covers the Wraith too. On Linux, Send a report lists these keyboards with their interfaces, so a device request can tell us whether an interface carries typing. Once one shows it doesn't, we can flip linux for that model in the generator.

Not in this PR

  • SteelSeries Apex (Support more SteelSeries Apex keyboards #9): the protocol changes from model to model, so we still need dumps from owners.
  • Logitech HID++ keyboards: there's no keyboard driver yet, and the HID++ interface can also carry typing.
  • Extra Corsair Bragi keyboards (K60 PRO TKL/MONO/SE from ckb-next, Galleon 100 SD from OpenLinkHub): no source gives their control interface directly, so I left them out.

Tests

cargo test (core, xtask, cli), clippy with -D warnings, cargo fmt --check, cargo xtask check, release.py lint, and npm run check plus vitest in app/ all pass. New tests cover:

  • the model table (facts spot-checked against OpenRazer, all keyboards read-only, only the V4 Mini opened on Linux)
  • a wired keyboard: no battery read, standard brightness
  • the Huntsman V2: no game mode read
  • the udev rule never opening the closed keyboards
  • report_devices listing them on Linux

Still needs a real keyboard on Windows: nobody has checked that the collection we pick on the interface takes the 90-byte feature report.

🤖 Generated with Claude Code

hex-dump and others added 2 commits November 17, 2026 18:36
tools/openrazer_facts.py --keyboards now writes the Razer keyboard table
(razer_keyboard_models.rs) from OpenRazer's keyboard driver and daemon:
the interface of the reports, the wait, and the transaction id of the
battery, brightness and game mode reads. Laptops and keypads are left out.
The driver reads the battery and the game mode only where a keyboard has
them, and the standard brightness read (03 83) of the older keyboards.

On Linux the udev rule still opens only the BlackWidow V4 Mini
HyperSpeed: on most of the others the interface OpenRazer sends to also
carries typed keys. PeriHub does not open those on Linux, and Send a
report lists them with their interfaces instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hex-dump
hex-dump merged commit 049b5df into main Nov 17, 2026
9 checks passed
@hex-dump
hex-dump deleted the feat/more-keyboards branch November 17, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant