4

I have a Logitech Trackman Marble (also known as a MarbleMouse), which lacks a middle button. Previously, I have emulated a middle-click by clicking with both left and right buttons. This works great under KDE Plasma.

However, I am sick unto death of Plasma, and recently switched back to OpenBox. Now, my emulated middle click no longer works.

I have set Emulate3Buttons true in both /etc/X11/xorg.conf and in /usr/share/X11/xorg.conf.d/50-marblemouse.conf. I know that the latter file is still being read, because I needed a hack in it to scroll, and that still works.

I am running xorg 7.7 under Ubuntu 12.10 with OpenBox 3.5.0.

Raja G
  • 102,391
  • 106
  • 255
  • 328

2 Answers2

1

Old problem, still current in Ubuntu 18.10.

libinput and evdev are the main keywords to look for in duckduckgo if you want to resolve the middle mouse button issue. Some suggestions for a solution in the following.

You phrase the question quite specific ... I guess this is about Unix style copy paste in the terminal, right ?!?

Please have a look here:

https://askubuntu.com/a/390308/354678

and very proper:

https://unix.stackexchange.com/questions/9973/configuring-mouse-for-rightleft-button-simulating-middle-click-for-copy-paste

and

https://wiki.ubuntu.com/X/Quirks#A2-button_Mice

and

How do I enable Middle mouse button emulation in 12.04 LTS?

It depends a lot on the Window manager. In XFCE different things work (because things work different) than in Gnome or Unity.

Or Wayland?!?

The confusion in config methods makes life hard to predict. It may help to invoke the man evdev for modern systems.

I could post example configs (my Logitech Marble Mouse trackball actually does work perfect in XFCE4: Active middle mouse button emulation copy-paste and scrolling with the right little button). Tell me which one you'd like to see.

Just try all config advice to be found in the askubuntu etc., at least one solution will work.

Same idea, strange phrasing as well:

Chrome/Chromium middle mouse button for scroll Linux, Mac

You know this one?

https://help.ubuntu.com/community/Logitech_Marblemouse_USB

Credits to whom it deserves: It looks to me like developers listened and enabled the middle mouse button emulation in Ubuntu 18.10 by default. Thank you smart guys, this significantly reduces the stupid pain points in modern distros.

1

A bit late, but this might do the work:

#!/bin/bash
DEVICE="Logitech USB Trackball"
# Buttons are:
# 1 - Large left
# 8 - Small left
# 9 - Small right
# 3 - Large right

Properties BEFORE

echo ================================================================= xinput --list-props "${DEVICE}"

Exchange 8 with middle-click (2), so, middle-clicking opens a new page in browser

xinput --set-button-map "${DEVICE}" 1 8 3 4 5 6 7 2 9

Left-small button-press scrolls:

xinput --set-prop "${DEVICE}" "libinput Button Scrolling Button" 8

NO Natural Scrolling: finger goes down, scrollbar button goes down, page moves upwards

xinput --set-prop "${DEVICE}" "libinput Natural Scrolling Enabled" 0

Scroll Methods has three values that can be enabled and disabled: 1) Two-finger scrolling, 2) Edge scrolling and 3) On-Button scrolling.

Only 0, 0, 0 and 0, 0, 1 are available for this trackball, or else an error raises.

xinput --set-prop "${DEVICE}" "libinput Scroll Method Enabled" 0, 0, 1

This setting makes the scroll button enable/disable at each click

xinput --set-prop "${DEVICE}" 'libinput Button Scrolling Button Lock Enabled' 0

echo ================================================================= xinput --list-props "${DEVICE}"

This helps a lot:

RodolfoAP
  • 171