Type something to search...

How to configure the DEFT Pro trackball on Linux

This is my Xorg configuration for the Elecom DEFT Pro trackball on Manjaro.

Create this configuration file:

/usr/share/X11/xorg.conf.d/99-trackball.conf

The important part is ButtonMapping. In the first mapping, button 10 is remapped to 1, so Fn1 acts as the left button. Button 11 is remapped to 2, so Fn2 acts as the middle button.

Section "InputClass"
        # DEFT PRO Buttons:
        #    1: Left button
        #    2: Middle button (wheel click)
        #    3: Right button
        #    4: Wheel scroll up
        #    5: Wheel scroll down
        #    6: Wheel tilt left
        #    7: Wheel tilt right
        #    8: Back button
        #    9: Forward button
        #   10: Fn1 (button on the left of the ball)
        #   11: Fn2 (button on right most)
        #   12: Fn3 (button on the above of the slide switch)
        Identifier      "Elecom DEFT Pro Trackball"
        MatchProduct    "DEFT Pro TrackBall"
    Driver          "libinput"
        Option          "ScrollMethod" "button"
        Option          "ScrollButton" "9"
        Option        "MiddleEmulation" "on"
        Option          "ButtonMapping" "1 2 3 4 5 6 7 8 9 1 2 12"
EndSection

I also use a second version with scroll-button lock. This makes the forward button toggle scroll mode while the ball handles scrolling.

Section "InputClass"
# DEFT PRO Buttons:
# 1: Left button
# 2: Middle button (wheel click)
# 3: Right button
# 4: Wheel scroll up
# 5: Wheel scroll down
# 6: Wheel tilt left
# 7: Wheel tilt right
# 8: Back button
# 9: Forward button
# 10: Fn1 (button on the left of the ball)
# 11: Fn2 (button on right most)
# 12: Fn3 (button on the above of the slide switch)
Identifier "Elecom DEFT Pro Trackball"
MatchProduct "DEFT Pro TrackBall"
Driver "libinput"
Option "ScrollMethod" "button"
Option "ScrollButton" "9"
Option "ScrollButtonLock" "true"
Option "MiddleEmulation" "on"
Option "ButtonMapping" "1 2 3 4 5 6 7 8 12 1 2 9"
EndSection

Related Posts

Codex anywhere with tmux, Termius, and Tailscale

My current mobile Codex setup is deliberately simple: I use Termius on my phone to SSH into my own laptop, then run Codex inside a [tmux](https://gi

read more

Ralph Loop as a Plan Queue

Ralph Loop is the simple idea of putting an AI coding agent in a loop and giving it enough structure to keep making progress. My version is deliberately smaller than the

read more

Input Chinese pinyin with tones on Linux with fcitx

The goal is to type pinyin with tone marks directly from the Linux input method: nǐ hǎoThe schema I used is [rime-lumen-pinyin](https://github.com/williampan/rime-lumen-pinyin/tree/mast

read more

Use Pocket (read it later) on KOReader

Pocket does not integrate with KOReader directly, but news2reader can expose Pocket articles as an OPDS catalog. Useful links:[MobileRea

read more