0

Background

A Logitech TrackMan was configured to have its small right button trigger the back functionality in Firefox. Here's an image of the device from the Ubuntu Community wiki:

TrackMan Marble Mouse

The keyboard and mouse are routed through an IOGEAR 2-Port KVM switch. The values from xinput show:

$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ATEN KVM V1.2.116                         id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ ATEN KVM V1.2.116                         id=11   [slave  keyboard (3)]
    ↳ Unicomp Inc Unicomp R7_2_10x_Kbrd_v7_47   id=13   [slave  keyboard (3)]
    ↳ Asus WMI hotkeys                          id=9    [slave  keyboard (3)]
    ↳ Eee PC WMI hotkeys                        id=10   [slave  keyboard (3)]

System:

$ uname -a
Linux hostname 6.9.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 31 May 2024 15:14:45 +0000 x86_64 GNU/Linux
$ cat /etc/issue 
Antergos Linux \r (\l)
$ echo $XDG_SESSION_TYPE
x11

Using the KVM appears to hide the product name. So despite X11 having an input class set, I don't believe the configuration is being applied:

$ cat /etc/X11/xorg.conf.d/10-libinput.conf 
Section "InputClass"
  Identifier    "Marble Mouse"
  MatchProduct  "Logitech USB Trackball"
  Driver        "libinput"
  Option        "ScrollMethod"        "button"
  Option        "ScrollButton"        "9"
  Option        "MiddleEmulation"     "true"
  Option        "HorizontalScrolling" "false"
  Option        "ButtonMapping"       "1 2 3 4 5 6 7 9 8"
EndSection

Instead, the buttons are remapped as follows:

$ cat $HOME/.xsessionrc
# Enable click+hold small right mouse button for scrolling trackball.
xinput set-prop 12 "libinput Button Scrolling Button" 9

# Disable horizontal trackball scrolling.
xinput set-prop 12 "libinput Horizontal Scroll Enabled" 0

# Forward small left click; backward small right click.
xinput set-button-map 12 1 2 3 4 5 6 7 9 8

Testing the right-click shows button #8:

$ xinput test 12
button press   8 
button release 8 

Note: The trackball is used left-handed, so buttons 8 and 9 are swapped.

In Firefox, the about:config settings for mousebutton.4th.enabled and mousebutton.5th.enabled are set to false, although this setting appears to have no effect.

Problem

This functionality no longer works. That is, clicking the small button no longer navigates back in the browser. Scrolling continues to work.

Question

Any idea how I can reinstate a single click for button 9 in the image as the back functionality for Firefox, while maintaining the ability to scroll by pressing and holding that same button?

0

You must log in to answer this question.

Browse other questions tagged .