-
Notifications
You must be signed in to change notification settings - Fork 131
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
feat: add mouse wheel events to defsrc #592
Conversation
Thanks for the PR! The thing that stands out to me most for my initial review is that I don't know that it's valuable to have the |
While thinking of a good reason we should keep I haven't delved into how So maybe we should allow adding the new mouse scroll labels to As to why I think this kind of dynamic adjustment is necessary: users might remap scroll distance so we can't know what is the scroll distance value until we read it directly from input. |
That seems like it would be a reasonable solution to the issue. Potentially might need to add a new |
Now this works as nothing were remapped:
Well, actually there is a small difference. Currently kanata assumes that all scroll events have value 1 or -1 (120 and -120 for hi-res). If a mouse sends scroll event with value other these e.g. 3, it's still treated as 1. However this problem won't happen if user doesn't map any of Previously I proposed we do this:
But there are some downsides:
However this "dynamically adjust distance" thing is probably not worth it anyway, because IMO users having remapped scroll to send 2 instead of 1 is niche enough to not care. Again, like above, this problem is not-existent if mouse wheel is not mapped. |
This also works:
|
I'm not sure why build-test-clippy-linux don't pass. It works for me locally. Edit: Oh, it's because of 9516cbb |
Reverted some changes as per the above comment. However I deem it arguable if it's better this way, since it requires adding an "imaginary" |
Tested on linux. One time when I ran with this config
when scrolling up it both scrolled and outputted |
Describe your changes. Use imperative present tense.
Closes #553
defsrc
deflayer
or anywhere else don't error and just outputs nothing.Checklist