Skip to content

Module selector hides None and displays Encoder for stored None value #150

Description

@av-leschinskiy

Summary

For Ergohaven K:04, the firmware exposes None as value 0 for both module selectors, but Entropy does not allow selecting it and displays Encoder when the stored value is actually None.

This makes it impossible to accurately configure or inspect a keyboard with no module connected to either half.

Environment

  • Entropy: 0.3.2
  • Entropy source revision: 613fdb4bc8ea40e06aadb724f9b3f44e80827b5b
  • Keyboard: Ergohaven K:04
  • Firmware: 0.1.6
  • OS: NixOS / Linux
  • Connection: USB

Steps to reproduce

  1. Connect a K:04 with no external module attached to either half.
  2. Set QMK setting QSID 149 (left module) to 0 and QSID 150 (right module) to 0. The firmware definition maps value 0 to None.
  3. Read both settings back and confirm they return 0.
  4. Open the module settings page in Entropy.

Actual behavior

Both halves are displayed as Encoder, and None is absent from the module dropdown.

Before the direct correction, this keyboard reported:

  • QSID 149: 1 (Encoder)
  • QSID 150: 2 (Trackball)

After writing and independently reading back 0 for both QSIDs, Entropy still displays Encoder for both halves.

Expected behavior

  • None should be available in the module selector.
  • A stored value of 0 should be displayed as None.
  • Users with empty module connectors should be able to explicitly disable modules on both halves.

Relevant code

module_setting_select_variant_indices filters ModuleDeviceKind::None out of the dropdown.

ModuleSettingsGroup::selected_module_kind replaces a stored None value with the first non-None variant, which is Encoder for K:04.

These two behaviors appear to explain both the missing option and the incorrect displayed value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions