-
-
Notifications
You must be signed in to change notification settings - Fork 40.5k
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
Expand digitizer feature. #15917
Expand digitizer feature. #15917
Conversation
* switch to absolute x/y * switch to buttons bitmask * add digitizer keys for keymaps * configurable usage id * fuzzy x/y os workarounds
@@ -0,0 +1,48 @@ | |||
#pragma once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a license header.
But also, this may be better as a keymap for handwired/onekey
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, good call. I just wired up a promicro onekey board to test with, so I can make this suggested change.
I read through the changes and they look good. There is a sample fw in handwired/onekey that you can use to test and demonstrate usage of what you added. It probably should be updated with your changes at least. I also had troubles with the cursor disappearing on windows. My first approach was to move the mouse afterwards like you did but after digging, I found that windows could be configured to avoid hiding the cursor + setting the usage Id to generic digitizer helped. I couldn't test on macOS so that's a good thing you could. |
Would it be worth adding a define so that this behavior can be configurable? Because I can see how both cases could be useful. |
There actually are several defines to tweak how this feature works now. You can enable either (or both) of the 'fuzzy' strategies that I implemented; by default, both are disabled: // enable all fuzzy strategies
#define DIGITIZER_FUZZ
// enable fuzzy InRange strategy, which generates multiple touch events
#define DIGITIZER_FUZZ_INRANGE
// enable fuzzy mouse strategy, which jiggles the mouse after a touch event
#define DIGITIZER_FUZZ_MOUSE I think the function name |
Thank you for your contribution! |
I've been toying around with this MR (it requires some changes to not cause conflicts in
This is from
|
I checked the HID usage table again and couldn't find a clear usage to define the resolution. If you can find it or an example of a hid report that works, that could be helpful. |
@a-chol IIRC I tried it by reporting it as either a touch screen or pen. In both cases the cursor is duplicated, and apparently this is by design in Wayland/GNOME: https://gitlab.gnome.org/GNOME/mutter/-/issues/1916. I've put this on the side for now, but I'd be happy to further test this MR once it's ready (i.e. takes into account the latest |
Thank you for your contribution! |
Thank you for your contribution! |
Expands on the awesome digitizer work done by @a-chol in #12851.
This is my first time contributing to qmk or writing anything substantial in c, so feedback is very welcome.
Description
Fleshes out the recent digitizer feature:
0x01
)Breaking changes:
DIG_REL2ABS_X(float)
andDIG_REL2ABS_Y(float)
macros to get back the old behaviortipswitch
member fromdigitizer_t
in favor of abuttons
bitmaskI have also added an example keymap using these features under
keyboards/handwired/digitizer_demo/
.Types of Changes
Issues Fixed or Closed by This PR
Checklist