jtroo / kanata

Improve keyboard comfort and usability with advanced customization
GNU Lesser General Public License v3.0
3.08k stars 129 forks source link

Feature request: Properly name devices #1375

Open Kommynct opened 1 day ago

Kommynct commented 1 day ago

Is your feature request related to a problem? Please describe.

My mouse is still selected even if linux-device-detect-mode keyboard-only is set, but i've realized the real problem isn't that kanata is grabbing these devices, but that they have non-standard, randomized names.

Describe the solution you'd like.

kanata-1 should really be kanata-logitech-usb-receiver

since the mouse by default is named logitech-usb-receiver

Describe alternatives you've considered.

n/a

Additional context

No response

jtroo commented 1 day ago

kanata-1 should really be kanata-logitech-usb-receiver

since the mouse by default is named logitech-usb-receiver

How does this solve the issue?

Kommynct commented 1 day ago

because per device input settings are setup like this in hyprland, sway, and many others

device { name = logitech-usb-receiver sensitivity = -0.85 accel_profile = flat repeat_delay = 225 repeat_rate = 8 }

if it's just kanata-1 and it's randomly assigned, i can't have per-input device configurations, if it changes to

kanata-logitech-usb-receiver

it'll be predictable, i'll just rename everything to kanata-whatever and my input settings will be properly configured.

If I create a setting that's kanata-1, if I was to, for example, not have one device plugged in, then i'd end up with my input settings applying to different things randomly.

jtroo commented 1 day ago

Kanata only creates one uinput device. If it's grabbing multiple mouse devices they all get coalesced into one event stream associated with the Kanata device.

https://github.com/jtroo/kanata/blob/e8afdc43eef4d010fac9f0270865a1f74abc1a5c/src/oskbd/linux.rs#L386

Based on my understanding of how this solution is intended to fix the problem, you're asking for this to change to multiple uinput devices based on captured device names? Sounds like a lot of work and is a questionable solution.

Kommynct commented 17 hours ago

Kanata only creates one uinput device. If it's grabbing multiple mouse devices they all get coalesced into one event stream associated with the Kanata device.

this is a huge problem, if I plug a hidpi mouse into my laptop with a trackpad, it's impossible to give one separate settings from the other. I disable mouse acceleration on all mice, and leave it enabled on all trackpads, and obviously the sensitivity needs to be set differently for mice and trackpads.

Based on my understanding of how this solution is intended to fix the problem, you're asking for this to change to multiple uinput devices based on captured device names? Sounds like a lot of work and is a questionable solution.

there's no other way to support this usecase if you do want mice supported by kanata, and don't want to have to manually exclude devices, and what if I have a trackpad and mouse that I want kanata to handle but want to have different sensitivities set? No solution is possible in that case.

jtroo commented 9 hours ago

You can use evsieve to do device event splitting. For example if mouse button rebinds are desired to be processed by Kanata, buttons can go to one device grabbed by Kanata and the rest to a separate device. I likely won't ever get around to reimplementing this in Kanata.

https://github.com/KarsMulder/evsieve