Repository navigation
Razer keyboards: 67 more, read only - #66
Merged
Merged
Conversation
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>
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 --keyboardsgenerates 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
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::Closedand PeriHub doesn't open them on Linux at all. The check isperipheral::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 fliplinuxfor that model in the generator.Not in this PR
Tests
cargo test(core, xtask, cli), clippy with-D warnings,cargo fmt --check,cargo xtask check,release.py lint, andnpm run checkplus vitest in app/ all pass. New tests cover: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