-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Wacom pen: panning/scrolling #5854
Comments
Panning actually seems to work in Evince with one button, but I would still expect Firefox and other native Wayland applications to understand these gestures. Firefox, Chromium and others seem to understand the same button as a right-mouse button.
|
Does this behave differently in e.g. GNOME (Wayland session)? This isn't really Sway's ballpark; we (roughly) just marshal input events received from libinput to whatever application has focus, and it's up to the application to decide what to do with them. The issues from #4617 were resolved a while ago and are not related to this. |
I'm using Sway with ThinkPad Yoga 370 and have same issues. Scrolling with stylus works in GIMP and Evince, but I can't find any other applications that support it. I didn't any additional settings, right out of the box with
And right button recognized as
So, libinput works correctly, I guess. But why it doesn't work for most applications? They just ignore this events? Or is it a problem related to button mapping? |
Wayland has a tablet protocol, and applications need to bind tablet input handlers through it in order to get tablet events. GIMP and Evince, being drawing applications, do bind tablet handlers and thus receive tablet events. So does Firefox. If an application does not bind tablet handlers, Sway will treat the tablet as a mouse, and convert the tablet events it receives from libinput into mouse events it sends to the application. The conversion turns:
|
@Xyene Thank you very much for clarification. |
@Xyene Let me know if I understood it correctly. It is up to each application to implement (or not) input handlers specific for tablet events libinput sends? I recently switched to sway and noticed that xournal++ interprets my Wacom pen as a mouse, which is weird to me, as on X it handles it right. Is it because Xournal++ has to has an implementation specific for libinput? I know this is an old issue, but this one of the only problems I have been having since I switched, and using these tablets is very important for the classes I teach virtually. |
Yes, your understanding is correct. I believe Xournal++ used GTK 2 until ~recently, which did not support Wayland tablet events. My understanding is more recent versions of Xournal++ switched to GTK 3, so tablet events have the ability to work there. I don't use Xournal++ myself so I can't speak to whether that's the case or not, but I'd double-check you're using a recent version. |
I am using the most recent (non-beta/dev) one. Do you know anyone that supports pen correctly? I can switch in order to stay using sway, but I really need the note-taking app to support my drawing table well. |
I'm using |
The pressure sensitivity does work for me actually. But on the configuration to remap buttons on xournal, the one that applies to the Pen is the mouse one. Also, in X when it detects the pen there is no cursor shown when hovering the paper, only the black dot that also appears when writing. But that is not my biggest problem. On Xorg I used xsetwacom to adjust my pressure sensitivity, which by default its a little low for me and to remap the first button to become just an scrolling button. My question is, on Sway those settings should be set on every app (if supported), or it would/should be dealt by Sway itself? This may be a silly question, sorry if it is, as I am still very new to Sway and Wayland stuff overall. |
Hmm, I'm not sure what you mean here. In
Yeah this is the case for me as well.
I don't believe Sway currently has controls for this, but @Xyene would be a better person to ask (also whether it would be possible for Sway to support this I guess). |
Hello, I am unsure if I should continue the discussion on this issue or start a new one, so tell me if I'm at the wrong place. I'm using this as a config for my wacom stylus :
I got the 331 from
However, this don't work for scrolling while pressing this button on the stylus. I don't know why. I have confirmed that it worked for my mouse with
(here NAME (number) as opposed to BTN_STYLUS) |
Yes, this is a missing feature in the libinput, see: https://gitlab.freedesktop.org/libinput/libinput/-/issues/729 Another option would be to use same "hacks" as on X, one could modify sway to add such scrolling gesture support, sway already has some gesture support for a touchpad, not sure how nice it would work with an absolute device like this. |
When using a Wacom tablet, it would be desirable to be able to pan/scroll through documents. X11 users have
xsetwacom --set "Wacom Intuos S Pen stylus" Button 2 "pan" and
xsetwacom --set "Wacom Intuos S Pen stylus" "PanScrollThreshold" 200, but I have not been able to find the equivalent command for
swaymsg input, nor do I seem to find it in
sway-input(5)`.The text was updated successfully, but these errors were encountered: