-
-
Notifications
You must be signed in to change notification settings - Fork 442
[06x] Adaptive Bindings #4010
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
[06x] Adaptive Bindings #4010
Conversation
This is to facilitate upcoming changes to adaptive bindings, which would make this class able to handle mouse inputs, which it shouldn't
This is to facilitate an upcoming 'adaptive bindings' feature Alternatively, we would have had to use `IMouseHandler` which would cause some likely undesirable side effects
'field' is a new and preview-only keyword
cda8d24 to
647d000
Compare
|
Rebased a comment out and force pushed. Also hopefully fixed the linting issue (and why doesn't Rider auto fix these for me??) |
Code elsewhere in the project expects this to be present
|
Looks like this is working perfectly on Linux. Still have Windows and MacOS to test. |
|
Seems all good on Windows too. As mentioned, this does not work with Windows Ink plugin currently but there are no extra side effects. Exact same behavior as before this PR. |
|
Confirmed working on MacOS by @TheSevenPens. No problems on all output modes and pen buttons. |
This adds a new type of bindings: Adaptive Bindings
Fixes #2510 for 0.6.x
Description
See the issue for what "adaptive means", but the gist of it is that tip binding means left click, and barrel buttons send the signal that equates to a right or middle click respectively. E.g. on Linux Artist Mode a right click is
BTN_STYLUS2.These new bindings are intended to be used when switching between output modes. These functionally replace the Linux Artist Mode bindings. No more juggling profiles for default use cases when switching between output modes 🎉
Additionally, daemon defaults now chooses these adaptive bindings as seen here:

Technical
A new interface
IPenActionhas been added to avoid reusingIMouseHandleras originally suggested in the issue we're solving. Without that change, mouse bindings could still be picked up. To keep compatibility with existing output modes implementingIMouseHandler, this PR also decides that the first tablet pen button correlates to right click, and the 2nd to middle click.Please test thoroughly on non-Linux platforms. The 3 primary modes (artist, absolute, and relative) have been tested on Linux, but a double check is always handy.
Plugin developers making their own output modes may want to add support for these bindings (e.g. Windows Ink). The adaptive bindings supports output modes that implement either
IPenActionHandlerorMouseButtonHandler, and are injected via DI.