Skip to content

Support Vial layout options and avoid ZMK misclassification - #27

Merged
srwi merged 1 commit into
srwi:masterfrom
hazardouschurch:feature/vial-layout-and-zmk-detection
Jul 29, 2026
Merged

Support Vial layout options and avoid ZMK misclassification#27
srwi merged 1 commit into
srwi:masterfrom
hazardouschurch:feature/vial-layout-and-zmk-detection

Conversation

@hazardouschurch

Copy link
Copy Markdown
Contributor

Checklist

Summary

This PR improves Vial support and fixes device discovery for Vial/QMK keyboards.

Related issue

Svalboard is a QMK keyboard. The device was incorrectly identified as a ZMK device. It would not connect because of this.

screenshot-2026-07-28_20-03-15

Type of change

  • [ x ] Bug fix

  • [ x ] New feature

  • Prevent Vial/QMK devices from being replaced by a guessed ZMK serial/BLE device when they share the same VID/PID.

  • Add parsing of Vial layouts.labels.

  • Filter optional Vial/KLE keys using the existing Layout dropdown.

  • Add a unit test covering Vial layout-option filtering.

With the help of AI I was able to identify it was getting misclassified. I'm not well versed in Rust. The changes in device_discovery.rs are related to the misclassification.

The other changes are less important but would be more of an annoyance for users. The Svalboard has integrated pointer devices; using a pointer activate a layer so it flashes the secondary south keys. This is mostly due to them defaulting to a key rather than a pass-through in Vial. Binding them as a pass-through or using the Sval board without them bound works. Its just anoying. SvalBoard has options to have a secondary set of south keys. More users don't have them, as it's an experimental option. This was added/changed to remove the secondary keys in the setup.
image

Testing

  • cargo fmt
  • cargo test vial_layout_options_filter_optional_keys
  • cargo build

Screenshots or recordings

screenshot-2026-07-28_20-46-42 screenshot-2026-07-28_20-46-31 screenshot-2026-07-28_20-46-13

Glad I found this; I was about to write something like this myself. Although it would have been in some variant of C

@srwi

srwi commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Hi, thank you for the PR. The device discovery fix makes sense to me. My Vial Corne is not affected by this but it seems like the Svalboard is because of the mouse input which the Corne doesn't have.

I think after this the device discovery could use an overall cleanup, but I can do that afterwards.

Could you please extract the KLE change into a separate PR? I think that one needs some work to be mergeable, but I didn't look into it fully yet. However I would like to get the device discovery fix merged already.

@hazardouschurch
hazardouschurch force-pushed the feature/vial-layout-and-zmk-detection branch from b23e508 to 2277bc9 Compare July 29, 2026 21:29
@hazardouschurch
hazardouschurch marked this pull request as draft July 29, 2026 21:31
@hazardouschurch
hazardouschurch force-pushed the feature/vial-layout-and-zmk-detection branch from 2277bc9 to 9733c30 Compare July 29, 2026 21:34
@hazardouschurch
hazardouschurch marked this pull request as ready for review July 29, 2026 21:43
@hazardouschurch

Copy link
Copy Markdown
Contributor Author

Ok Removed KLE changes. Staging a separate PR for KLE changes

@srwi
srwi merged commit 6e2e048 into srwi:master Jul 29, 2026
@srwi

srwi commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants