Solaar/tests/logitech_receiver
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
..
__init__.py tests: Add tests of common module 2024-02-18 06:10:53 -05:00
fake_hidpp.py centurion: Headset icon kind at construction (#3226) 2026-05-19 15:36:29 -04:00
test_base.py G522 LIGHTSPEED headphones support 2026-05-21 10:13:00 -04:00
test_base_usb.py Speedup lookup of known receivers 2025-01-01 11:33:07 -05:00
test_common.py ui: Show offline status for receiver-paired device batteries (#3217) 2026-05-13 17:32:03 -04:00
test_desktop_notifications.py tests: mock the libnotify backend so the suite raises no real notifications 2026-05-21 10:15:12 -04:00
test_device.py G522 LIGHTSPEED headphones support 2026-05-21 10:13:00 -04:00
test_diversion.py Refactor: Introduce Feature enum 2024-10-14 07:28:09 -04:00
test_hidpp10.py device: Handle composite IntFlag.name on Python < 3.11 (#3187) 2026-04-16 11:38:25 -04:00
test_hidpp20_complex.py G522 LIGHTSPEED headphones support 2026-05-21 10:13:00 -04:00
test_hidpp20_simple.py device: Fix operator precedence bug and end-of-configuration timing in device.changed() (#3173) 2026-05-13 11:30:26 -04:00
test_notifications.py address review: name gap sentinel, hoist init guard, scope power-on force 2026-06-12 06:27:29 +02:00
test_receiver.py device: Support per-slot unpair on Lightspeed receivers (CLI + GUI) (#3183) 2026-04-17 09:34:58 -04:00
test_rgb_power.py G915 TKL: device-gated RGB-claim quirk — keep onboard mode on claim 2026-06-15 11:27:23 +02:00
test_setting_templates.py headset RGB: regression tests for _HeadsetOnboardEffect color seeding 2026-05-21 10:13:00 -04:00
test_settings_validator.py common: render RGB color values as 0xrrggbb in config and solaar show 2026-05-12 12:51:36 -04:00