Replicating trackball xorg config to wayland

Hello!

I’m actually using a Elecom Deft Pro, a 8 button trackball and I heavilly customized its behavior via a xorg.conf file and I’m actually still using X11 because of that.

Yesterday I read the article about Plasma dropping X11, and I want to take my time and replicate the same behavior on Wayland.

This is how I configured my trackball on X11:

Section “InputClass”
Identifier “ELECOM TrackBall Mouse DEFT Pro TrackBall Mouse”
MatchProduct “ELECOM TrackBall Mouse DEFT Pro TrackBall Mouse”
MatchIsPointer “yes”
Driver “libinput”
#Swap Middle and Fn1 Buttons
Option “ButtonMapping” “1 10 3 4 5 6 7 8 9 2 11 12”
#Enable trackball scroll when the wheel is pressed
Option “Scroll Method Enabled” “0, 0, 1”
Option “ScrollMethod” “button”
Option “Button Scrolling Button” “2”
#Map right button drag lock to Fn2 and left one to Fn3
Option “DragLockButtons” “12 1 11 3”
EndSection

In short I need to:

  • Enable the trackball scrolling by holding the scroll wheel (I’ve already enabled it, it’s in the Mouse section in System configuration)
  • Swap the middle button (on the scroll wheel) and Fn1 while keeping the trackball scrolling by holding the scroll wheel — In the mouse settings I can map a mouse button to a keyboard sequence but not to another mouse button
  • Set the right button drag lock on Fn2 (it means that pressing Fn2 keeps the right button hold until I press it again)
  • Set the left button drag lock on Fn3

How do I replicate all of this on Wayland?

Thank you!

1 Like

You customized yours much more than I did mine, but I think ordinarily you’d do some qdbus calls for your input device. For example, mine is like this: Logitech Marble Mouse - ArchWiki

If you open KRunner and type “KWin debug”, you’ll get an option called “Open KWin debug console”, with it you can inspect properties of your mouse so you can check what you can change. You’ll probably have to figure out some stuff for this if nobody else documented your specific device before, but you’re probably used to that since you know how to make Xorg config files. :stuck_out_tongue:

I tried figuring out what could I change by inspecting both the KWin debug console and the Qt D-Bus Viewer, however there are no options in Plasma to customize my trackball buttons beside changing the scroll lock one (as is mentioned in the archwiki you linked) or assigning a keyboard combo to a mouse button.

From what I gathered online, the only way to achieve my goal is to use an application that intercepts and remaps libinput events, so I decided to try Input Remapper and it seems to work fine for now.

1 Like