Solaar/tests
grechmarlon 73adad2a52 G915 TKL: device-gated RGB-claim quirk — keep onboard mode on claim
A usbmon capture of G HUB's bring-up (receiver passed to a Win11 VM)
showed the root cause of the dead F-row/media keys AND the F4 blackout:
the RGB SW-control claim switched the keyboard to host mode
(ONBOARD_PROFILES 0x10 0x02). On the G915 TKL host mode disables the
F-row/media keys (#1100), and the host-mode transition made the firmware
re-assert the M/MR indicator (overlaid on F1-F4 on this keyless model)
over the per-key colours. G HUB drives the LEDs from onboard mode via the
RGB SetSWControl claim alone, never switching.

Gated by modelId in device_quirks.py so no other device changes:
- rgb_claim_keeps_onboard_mode(): _claim_sw_control skips the onboard->
  host switch for listed models -> F-keys/media keys work and the
  power-on F4 blackout is gone, with no timer and no G-key divert.
- rgb_repaint_on_profile_change(): re-assert + repaint on a reported
  profile change so an accidental switch doesn't strand the scheme.

Documented residual (cannot be fixed without breaking the keys): F1-F4
are the M1/M2/M3/MR indicator zones on the TKL. The firmware re-asserts
the active-profile indicator on them on profile switch and after idle,
so those keys can show the indicator instead of the user colour.
Claiming that subsystem (G-key divert) would stop it but disables the
F-row/media keys, so onboard mode + working keys is the chosen trade-off.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-15 11:27:23 +02:00
..
hid_parser Introduce hid_parser tests 2024-09-15 09:19:13 -04:00
hidapi hidapi: Explicitly load hidapi/udev implementation 2024-10-11 07:42:38 -04:00
logitech_receiver G915 TKL: device-gated RGB-claim quirk — keep onboard mode on claim 2026-06-15 11:27:23 +02:00
solaar tests: mock the libnotify backend so the suite raises no real notifications 2026-05-21 10:15:12 -04:00
test_keysyms keysyms: Introduce tests for this package 2024-10-11 07:42:38 -04:00
__init__.py tests: Introduce tests with pytest 2024-02-10 13:58:20 -05:00
conftest.py tests: mock the libnotify backend so the suite raises no real notifications 2026-05-21 10:15:12 -04:00