Skip to content

fix: enable --list for features == "gui"#2002

Merged
jtroo merged 2 commits intojtroo:mainfrom
groutoutlook:main
Apr 3, 2026
Merged

fix: enable --list for features == "gui"#2002
jtroo merged 2 commits intojtroo:mainfrom
groutoutlook:main

Conversation

@groutoutlook
Copy link
Copy Markdown
Contributor

@groutoutlook groutoutlook commented Apr 3, 2026

Describe your changes. Use imperative present tense.

  • Re-enable --list path for Windows when feature = "gui" and feature = "interception_driver".
  • Remove restrictive not(feature = "gui") guards from:
    • list_devices_windows()
    • extract_hardware_id()
    • WindowsDeviceInfo
    • get_device_info()
  • Add CLI branch in win_gui::cli_init():
    • --list triggers list_devices_windows() and exits.

Checklist

  • Add documentation to docs/config.adoc
    • N/A
  • Add example and basic docs to cfg_samples/kanata.kbd
    • N/A
  • Update error messages
    • N/A
  • Added tests, or did manual testing
    • Manual testing with kanata --list

Extra contexts

$ kanata --list
Available keyboard devices:
===========================
Found 2 keyboard device(s):

  1. Device: \\?\ACPI#DLLK0B2A#4&376b7e5b&0#{884
     Raw wide string bytes: [92, 0, 92, 0, 63, 0, 92, 0, 65, 0, 67, 0, 80, 0, 73, 0, 35, 0, 68, 0, 76, 0, 76, 0, 75, 0, 48, 0, 66, 0, 50, 0, 65, 0, 35, 0, 52, 0, 38, 0, 51, 0, 55, 0, 54, 0, 98, 0, 55, 0, 101, 0, 53, 0, 98, 0, 38, 0, 48, 0, 35, 0, 123, 0, 56, 0, 56, 0, 52, 0]

  2. Device: \\?\HID#ConvertedDevice&Col01#5&b5a182d&0&0
     Hardware ID: HID
     Raw wide string bytes: [92, 0, 92, 0, 63, 0, 92, 0, 72, 0, 73, 0, 68, 0, 35, 0, 67, 0, 111, 0, 110, 0, 118, 0, 101, 0, 114, 0, 116, 0, 101, 0, 100, 0, 68, 0, 101, 0, 118, 0, 105, 0, 99, 0, 101, 0, 38, 0, 67, 0, 111, 0, 108, 0, 48, 0, 49, 0, 35, 0, 53, 0, 38, 0, 98, 0, 53, 0, 97, 0, 49, 0, 56, 0, 50, 0, 100, 0, 38, 0, 48, 0, 38, 0, 48, 0]

Configuration example:
  (defcfg
    windows-interception-keyboard-hwids (
      [92, 0, 92, 0, 63, 0, 92, 0, 65, 0, 67, 0, 80, 0, 73, 0, 35, 0, 68, 0, 76, 0, 76, 0, 75, 0, 48, 0, 66, 0, 50, 0, 65, 0, 35, 0, 52, 0, 38, 0, 51, 0, 55, 0, 54, 0, 98, 0, 55, 0, 101, 0, 53, 0, 98, 0, 38, 0, 48, 0, 35, 0, 123, 0, 56, 0, 56, 0, 52, 0]  ; \\?\ACPI#DLLK0B2A#4&376b7e5b&0#{884
      [92, 0, 92, 0, 63, 0, 92, 0, 72, 0, 73, 0, 68, 0, 35, 0, 67, 0, 111, 0, 110, 0, 118, 0, 101, 0, 114, 0, 116, 0, 101, 0, 100, 0, 68, 0, 101, 0, 118, 0, 105, 0, 99, 0, 101, 0, 38, 0, 67, 0, 111, 0, 108, 0, 48, 0, 49, 0, 35, 0, 53, 0, 38, 0, 98, 0, 53, 0, 97, 0, 49, 0, 56, 0, 50, 0, 100, 0, 38, 0, 48, 0, 38, 0, 48, 0]  ; HID (\\?\HID#ConvertedDevice&Col01#5&b5a182d&0&0)
    )
  )

@groutoutlook groutoutlook changed the title fix: add --list for features == gui fix: add --list for features == "gui" Apr 3, 2026
@groutoutlook groutoutlook changed the title fix: add --list for features == "gui" fix: enable --list for features == "gui" Apr 3, 2026
Copy link
Copy Markdown
Owner

@jtroo jtroo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jtroo jtroo merged commit 721c047 into jtroo:main Apr 3, 2026
5 checks passed
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