-
-
Notifications
You must be signed in to change notification settings - Fork 442
macOS: add "Artist Mode" #2371
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
macOS: add "Artist Mode" #2371
Conversation
Adds support for pressure, proximity, and tilt data in tablet-specific CGEvents. While macOS supports rotation and tangential pressure, OTD does not yet have an interface for them, so they cannot be provided. Raw tablet button support could be added, but OTD does not have a good portable interface for it yet.
a5aa9fb to
ea94245
Compare
|
I pushed some changes to make it always use mouse events, as apparently the tablet event fields can be set on mouse events as long as the subtype is one of the two tablet events. The dedicated tablet event types are intended to be used for non-mousing devices, so it was breaking things like CSP's Cmd+Opt brush size resizing, and Spacebar panning. |
|
Some caveats worth mentioning:
|
Since I based the behavior on the implementation of EvdevVirtualTablet, would this cause issues on Linux? I'm not sure you can push a mouse event without a position on macOS, so maybe it should fetch the current position if no SetPosition call has happened since the last flush. I guess it could also be implemented without the synchronous pointer interface. Instead, sending mouse events for every change. It's not clear to me what the difference is for virtual devices implementing or not implementing it. |
|
The behavior of Evdev is a bit different from macOS, when you call the Flush function, it flushes pending events set by SetPosition / SetPressure. Since SetPosition is not called for idle reports, no pointer events are sent to GUI. The idle reports are sent periodically when the pen is out of range, so your implementation will make the cursor teleport periodically when the pen is out of range. You could skip posting event if SetPosition is not called before Flush There are some other issues:
|
|
This needs rebased to work with the new DI rewrite. |
|
As mentioned, this needs a rebase to the latest codebase to be able to be merged. We are very interested in merging this PR. |
|
Has there been any progress on this? I badly need this. |
|
Very likely superseded by the #2894, as this pull is still not rebased to the latest version. If you need it bad enough you can compile it yourself as use it, both pull requests should be good enough to use. |
|
Closing in favor of #2894 as that PR now has further progress. Thanks for getting the ball rolling! |
Similar to Linux Artist Mode, which creates an evdev device and provides tablet events, this adds a virtual tablet class for macOS and an Artist Mode using it.
Adds support for pressure, proximity, and tilt data in tablet-specific CGEvents.
While macOS supports rotation and tangential pressure, OTD does not yet have an interface for them, so they cannot be provided.
Raw tablet button support could be added, but OTD does not have a good portable interface for it yet.
Fixes #2370