Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: FrameworkComputer/qmk_hid
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: FrameworkComputer/qmk_hid
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: rust-fixes
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 7 files changed
  • 1 contributor

Commits on Nov 13, 2026

  1. Fix raw HID framing and consume VIA setter responses

    Send the full 32-byte QMK payload after HIDAPI's separate report ID. The
    previous 32-byte write included the report ID and left the payload short.
    Zero-pad requests and reject oversized requests or requested responses.
    
    Consume acknowledgements for VIA setters and save commands so subsequent
    getters cannot mistake an earlier setter reply for their own response.
    Bound reads to one second, reject short or unexpected command replies,
    and check for incomplete writes instead of hanging or slicing invalid data.
    Propagate RGB color read failures. Print only received console bytes and
    stop reading after a device error.
    
    Add transport regression tests and an opt-in hardware round-trip test for
    the Framework ANSI keyboard (32ac:0012) and RGB macropad (32ac:0013).
    The hardware test changes brightness and macropad color, restores their
    original values, and never saves to EEPROM. Expected readbacks account
    for the attached firmware's brightness quantization.
    
    Validation performed on Windows:
    - cargo fmt --all -- --check
    - cargo clippy --all-targets -- -D warnings
    - cargo test
    - cargo test --test hardware -- --ignored --nocapture
    - Read macropad RGB brightness and keyboard backlight through the CLI.
    
    To reproduce hardware coverage, attach both modules and run the ignored
    hardware test above. Ordinary cargo test does not access hardware.
    Linux was not executed locally: WSL is unavailable. Transport changes use
    portable hidapi calls and retain the existing Linux backend.
    JohnAZoidberg committed Nov 13, 2026
    Configuration menu
    Copy the full SHA
    4826db1 View commit details
    Browse the repository at this point in the history
  2. Validate CLI inputs and handle combined lighting operations safely

    Process every requested lighting option instead of silently executing only
    the first branch. Reject percentages outside 0-100 and malformed or
    out-of-range hexadecimal USB IDs before opening devices. Keep information,
    indication, EEPROM reset, and bootloader operations mutually exclusive
    and reject combinations with lighting changes or saving.
    
    Propagate device-open and command failures instead of panicking, and exit
    unsuccessfully for missing or ambiguous devices. Save explicitly requested
    lighting channels; standalone save tries both channels and succeeds when
    at least one succeeds, accommodating modules with only one lighting type.
    The public save helper now returns Result instead of panicking.
    
    Allow indication on backlight-only modules without requiring RGB support.
    Attempt to restore the previous RGB effect even when indication fails.
    Discover raw HID devices by usage page without assuming interface 1, and
    return no matches for invalid library filters rather than panicking.
    
    Add CLI argument regression tests, document development and hardware
    checks, correct the EEPROM reset example, and run Linux CI tests and
    Clippy across all targets.
    
    Depends on the preceding transport fix: combined operations require VIA
    setter acknowledgements to be consumed before subsequent getters.
    
    Validation performed on Windows:
    - cargo fmt --all -- --check
    - cargo clippy --all-targets -- -D warnings
    - cargo test --all-targets
    - cargo test --test hardware -- --ignored --nocapture
    - cargo run -- --pid 0013 via --rgb-brightness --rgb-effect --rgb-hue --rgb-saturation --rgb-effect-speed
    - cargo run -- --pid 0012 via --backlight --backlight-breathing
    - cargo run -- --pid 0012 via --device-indication
    - cargo run -- --pid 0013 via --device-indication
    - cargo run -- --pid 0012 via --info
    - cargo run -- --pid 0013 via --info
    
    Attach both Framework modules to reproduce hardware checks. Lighting
    round trips restore original values without saving to EEPROM. The CLI
    regression test checks invalid IDs, invalid percentages, conflicting
    operations, and acceptance of combined lighting options with --save.
    Persistent save, EEPROM reset, bootloader, and factory changes were not
    exercised. Linux execution remains unverified locally because WSL is not
    installed; the updated Linux CI provides automated coverage when run.
    JohnAZoidberg committed Nov 13, 2026
    Configuration menu
    Copy the full SHA
    8634427 View commit details
    Browse the repository at this point in the history
  3. Encode VIA layout options as a full big-endian u32

    Match quantum/via.c in the sibling qmk_firmware checkout: layout options
    consume four big-endian bytes, while device indication consumes one byte.
    Previously every keyboard value was limited to eight bits and encoded as
    a single byte, putting layout options in the wrong byte position and
    rejecting larger valid values.
    
    Encode layout options at their full width. Reject indication values above
    255 and read-only keyboard value IDs with an error instead of panicking
    or sending an invalid setter. Derive Copy and Clone for the value ID enum.
    
    Add a wire-format regression test for a nontrivial 0x12345678 layout value,
    one-byte indication, oversized indication, and a read-only value ID.
    
    Validation performed on Windows:
    - cargo fmt --all -- --check
    - cargo clippy --all-targets -- -D warnings
    - cargo test --all-targets
    - cargo test --test hardware -- --ignored --nocapture
    
    The hardware test exercises the shared transport on both Framework modules
    and restores lighting settings without saving to EEPROM. Layout writes
    were verified against firmware source and unit tests, not sent to hardware,
    because the firmware persists layout settings. Reproduce the encoding
    check with cargo test keyboard_values_use_their_firmware_wire_width.
    Linux was not executed locally because WSL is unavailable; this change
    uses platform-independent byte encoding.
    JohnAZoidberg committed Nov 13, 2026
    Configuration menu
    Copy the full SHA
    bc86a8f View commit details
    Browse the repository at this point in the history
Loading