Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Properly name devices #1375

Open
Kommynct opened this issue Nov 24, 2024 · 5 comments
Open

Feature request: Properly name devices #1375

Kommynct opened this issue Nov 24, 2024 · 5 comments
Labels
enhancement New feature or request gauging interest Looking for additional discussion and viewpoints PRs welcome jtroo has no plans to work on this at present, but PRs are welcome question Further information is requested

Comments

@Kommynct
Copy link

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

@Kommynct Kommynct added the enhancement New feature or request label Nov 24, 2024
@jtroo
Copy link
Owner

jtroo commented Nov 24, 2024

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
Copy link
Author

Kommynct commented Nov 24, 2024

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
Copy link
Owner

jtroo commented Nov 24, 2024

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.

let device = uinput::VirtualDeviceBuilder::new()?

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.

@jtroo jtroo added question Further information is requested gauging interest Looking for additional discussion and viewpoints labels Nov 25, 2024
@Kommynct
Copy link
Author

Kommynct commented Nov 25, 2024

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
Copy link
Owner

jtroo commented Nov 25, 2024

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

@jtroo jtroo added the PRs welcome jtroo has no plans to work on this at present, but PRs are welcome label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gauging interest Looking for additional discussion and viewpoints PRs welcome jtroo has no plans to work on this at present, but PRs are welcome question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants