-
Notifications
You must be signed in to change notification settings - Fork 129
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
Intelligently ignore mouse devices in autodiscovery based on defsrc, and allow configurability #1279
Comments
Here is the relevant code if you want to give it a shot. Not sure when I'll get around to it. Line 236 in d54257a
I don't use autodetection on Linux; upon re-reviewing the code here apparently mice are explicitly looked for and grabbed 🤔. |
Are mice even useful to this software? i'll take a crack at it on friday, I'm terrible at programming so no promises, thanks for looking into it though, really appreciate it! I am of the opinion that mouse support should be manually enabled, would you be fine with a patch that does that? |
Yes. I do not use a mouse, I use the keyboard to move the mouse (HJKL keys), scroll (YUIO keys), left click (C key), right click (, Comma key) , middle click (d key), using a mouse layer, and I've seen the configs of multiple people who have a similar setup.
I think rather the existing default behavior should be (remain) with mouse support, and mouse support should be manually disabled in the config. this also would avoid breaking people's configs. |
I don't think what you're describing requires the mouse to be grabbed, I don't think mouse grabbing in particular is useful, correct me if I'm wrong, but moving the mouse with keys isn't the same as interpreting all input from the mouse. I suggest disabling it by default because there are no usecases I can think of and it breaks setups. the only use I can think of is the mouse back key switching to a layer |
Oh you only meant mouse key input (remapping) support, it wasn't clear to me from the way you described it.
You can't know how people use Kanata, there may be many people who map the mouse keys in a way that's useful to them. |
I generally agree with this, but I think settings that lead to buggy behaviors in particular should be disabled by default, and thus an exception, and this does. @jtroo your preference? and all future reports like this would be solved by disabling this, at the cost of having people change one line in their configs. It'd probably be worth it in the long run. |
Some users do remap mice but I think we should have a breaking change here; I doubt most users remap mice and this sounds worth disabling by default. |
I have tried fucking around with it, I ended up with some time today, and I can safely say I am in over my head and need to take a rust course to do any of this haha, sorry! https://github.com/Kommynct/kanata/tree/patch-1 you can see what I tried here, i doubt it will be of any help at all. |
A thought: we could avoid a breaking change by having the presence of mouse actions in defsrc determine the config value when not explicitly defined in defcfg. |
Makes sense, devices that aren't being modified by kanata should just never be grabbed by it just generally |
Can you test if #1289 works |
I'm in no position to this week, I just recently switched to nixos and have no idea how to test pull requests with everything being different, and I'm swamped with work anyway. If nobody else can this week I'll figure it out next week |
1.7.0 shipped to nixos and i'm unfortunately still facing this issue on all the mice i've tested. |
You set the autodetect setting explicitly? What does the log print with the |
^^is in my nixos files, logitech usb receiver is my mouse, i've also tried it with another logitech mouse that's wired, for testing i removed the dev-names-exclude and ran kanata with --debug, these are the results:
|
Ah, the log message is correct but the return value is wrong. |
Discussed in #1273
Originally posted by Kommynct October 5, 2024
Right now I have a very high DPI mouse that i've configured with hyprland like so:
device {
name = logitech-usb-receiver
sensitivity = -0.85
accel_profile = flat
}
If I startup kanata, I need to add
device {
name = kanata-1
sensitivity = -0.85
accel_profile = flat
}
However, that means that the mouse isn't properly matched anymore, if i have two mice and another is plugged in, they may alternate between kanata-1 and kanata-2 etc... i'd like to just disable mouse support all together since i'm not using kanata to control the mouse at all, i'm just using it for chording.
The text was updated successfully, but these errors were encountered: