swhkd icon indicating copy to clipboard operation
swhkd copied to clipboard

Device selection seems to always fail

Open tjbcg opened this issue 8 months ago • 4 comments

Version Information:

~$ uname -a
Linux zendesk 6.12.21-gentoo-dist #1 SMP PREEMPT_DYNAMIC Sat Apr  5 21:37:30 CEST 2025 x86_64 AMD Ryzen 7 5800X 8-Core Processor AuthenticAMD GNU/Linux
~$ swhkd -V
Simple-Wayland-HotKey-Daemon 1.3.0-dev

No matter the name of the device I use, swhkd always fails with No valid keyboard device was detected!. I suspect this line is the culprit: the value_delimitor should be a character that never appears in a device name. Since device names almost always include spaces, splitting the argument on spaces incorrectly splits a single name into many incorrect names.

tjbcg avatar Apr 14 '25 00:04 tjbcg

@newtoallofthis123 Can you look into this issue?

I'm not very familiar with clap.

Shinyzenith avatar Apr 14 '25 08:04 Shinyzenith

Version Information:

~$ uname -a
Linux zendesk 6.12.21-gentoo-dist #1 SMP PREEMPT_DYNAMIC Sat Apr  5 21:37:30 CEST 2025 x86_64 AMD Ryzen 7 5800X 8-Core Processor AuthenticAMD GNU/Linux
~$ swhkd -V
Simple-Wayland-HotKey-Daemon 1.3.0-dev

No matter the name of the device I use, swhkd always fails with No valid keyboard device was detected!. I suspect this line is the culprit: the value_delimitor should be a character that never appears in a device name. Since device names almost always include spaces, splitting the argument on spaces incorrectly splits a single name into many incorrect names.

can you give the command you are using with the device name? Would like to understand and test on my system

nots1dd avatar Apr 14 '25 08:04 nots1dd

I'm using swhkd -d -D 'Keychron Keychron K17 Pro Keyboard'. Changing the value delimitor to ',' does fix this specific issue on my machine

tjbcg avatar Apr 14 '25 08:04 tjbcg

I'm using swhkd -d -D 'Keychron Keychron K17 Pro Keyboard'. Changing the value delimitor to ',' does fix this specific issue on my machine

I see, I dont think setting it to , is the best option can be to set it to ' or " itself

can you just sanity check this delim and check whether ' works? If not am willing to try this out myself as well

nots1dd avatar Apr 14 '25 09:04 nots1dd