You are not logged in.

#1 2017-06-10 12:58:47

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Mouse buttons customization

Hello there,
I bought a brand new mouse (bluetooth), which has 2 thumb buttons. Following this wiki I realize the two buttons working as described.
I'd prefer to modify the two button action in order to use for scrolling the windows up and down.

So what kind of text to assign for a different keys. Or even better if the key is held longer to start auto-repeating.
I thought I'd put Up and Down for those two buttons as a global configuration. But I suspect that there won't be auto-repeatitions for those simulated key.


do it good first, it will be faster than do it twice the saint wink

Offline

#2 2017-06-10 17:30:27

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,320

Re: Mouse buttons customization

I'm not sure whether that's what you want, but try using xmodmap or xinput (same wiki) to map them to buttons 4 & 5 (the vertical wheel)

Offline

#3 2017-06-10 20:05:50

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: Mouse buttons customization

The detected buttons are 8 and 9. How will I replicate them to 4 and 5 ?
My intent is a better scrolling for lenghty windows, rather that spinning alot the mouse wheel. I'll be happy even I'm able to associate these buttons with PageUp and PageDown keys.


do it good first, it will be faster than do it twice the saint wink

Offline

#4 2017-06-10 20:55:49

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,320

Re: Mouse buttons customization

see eg. https://wiki.archlinux.org/index.php/Mo … p_tweaking

xmodmap -e "pointer = 1 2 3 4 5 6 7 4 5 10 11 12"

(watch the number of buttons!)

However, what you likely want to do is to emulate a wheel, see https://wiki.archlinux.org/index.php/Logitech_M570

This allows you to press and hold a button of your choice and have the mouse movements being translated in wheel events.
Fast movements result in fast wheeling.

Offline

#5 2017-06-12 16:48:53

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: Mouse buttons customization

I still not acquainted to the settings, so I removed all the previous modifications. Anyways I have the buttons already mapped as XF86Back and XF86Forward.
Even other programs, like kate, are jumping from one windows tab to the other.
So as I described above, please, would you write me an example ?
I tried to write

 # /etc/X11/xorg.conf.d/10-evdev.conf
Section "InputClass"
    Identifier      "Bluetooth Mouse"
    MatchProduct    "Bluetooth Mouse"
    Driver          "evdev"
    Option "EmulateWheel" "true"
    Option "EmulateWheelButton" "8 9"
EndSection

As long as

$ grep mouse /var/log/Xorg.0.log
[   660.166] (==) NVIDIA(0): Silken mouse enabled
[   660.313] (II) config/udev: Adding input device HID 0a5c:4503 (/dev/input/mouse0)
[   660.318] (II) config/udev: Adding input device Bluetooth Mouse (/dev/input/mouse2)
[   660.328] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/mouse1)

But is not working.

$ less  /var/log/Xorg.0.log
[    46.977] (II) config/udev: Adding input device Bluetooth Mouse (/dev/input/mouse2)
[    46.977] (II) No input driver specified, ignoring this device.
[    46.977] (II) This device may have been added with another device file.
[    47.031] (II) config/udev: Adding input device Bluetooth Mouse (/dev/input/event16)
[    47.031] (**) Bluetooth Mouse: Applying InputClass "libinput pointer catchall"
[    47.031] (II) Using input driver 'libinput' for 'Bluetooth Mouse'
[    47.032] (II) systemd-logind: got fd for /dev/input/event16 13:80 fd 52 paused 0
[    47.032] (**) Bluetooth Mouse: always reports core events
[    47.032] (**) Option "Device" "/dev/input/event16"
[    47.032] (**) Option "_source" "server/udev"
[    47.032] (II) event16 - (II) Bluetooth Mouse: (II) is tagged by udev as: Mouse
[    47.032] (II) event16 - (II) Bluetooth Mouse: (II) device is a pointer
[    47.032] (II) event16 - (II) Bluetooth Mouse: (II) device removed
[    47.032] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2.3/3-2.3:1.0/bluetooth/hci0/hci0:11/0005:05AC:3232.0003/input/input23/event16"
[    47.032] (II) XINPUT: Adding extended input device "Bluetooth Mouse" (type: MOUSE, id 16)
[    47.033] (**) Option "AccelerationScheme" "none"
[    47.033] (**) Bluetooth Mouse: (accel) selected scheme none/0
[    47.033] (**) Bluetooth Mouse: (accel) acceleration factor: 2.000

Last edited by TheSaint (2017-06-12 16:50:10)


do it good first, it will be faster than do it twice the saint wink

Offline

#6 2017-06-12 16:53:44

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,320

Re: Mouse buttons customization

There is an example on the linked wiki and this line

Option "EmulateWheelButton" "8 9"

doesn't match anything in it.

The approach works by picking *one* button that you press to turn the mouse movements into wheel events.

Offline

#7 2017-06-12 17:58:07

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: Mouse buttons customization

Xev reports me that the buttons are 8 and 9

seth wrote:

This allows you to press and hold a button of your choice and have the mouse movements being translated in wheel events.

I probably misunderstood, Do you mean that I should hold the assigned button while dragging the mouse ?
Tomorrow I study some more the case....


do it good first, it will be faster than do it twice the saint wink

Offline

#8 2017-06-12 20:08:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,320

Re: Mouse buttons customization

Sure, but the option takes one button.

Here's an excerpt of my /etc/X11/xorg.conf.d/10-mouse.conf

Section "InputClass"
	Identifier "evdev pointer catchall"
	MatchIsPointer "on"
	MatchDevicePath "/dev/input/event*"
	Driver		"evdev"
	Option      "EmulateWheel"				"true"
	Option      "EmulateWheelButton"		"9"
	Option      "EmulateWheelInertia"		"3"
	Option      "EmulateWheelTimeout"		"80"
	Option      "XAxisMapping"				"6 7"
	Option      "YAxisMapping"				"5 4"
	Option		"AccelerationNumerator"		"25"
	Option		"AccelerationDenominator"	"10"
	Option		"AccelerationThreshold"		"6"
EndSection

If I press button 9, I can move the mouse and by this operate scroll areas almost like with a touch screen (notice the inverted YAxisMapping)
EmulateWheelInertia and EmulateWheelTimeout control the pace of this.

You can also toggle and adjust this behavior at runtime using xinput (if you want)

Offline

#9 2017-06-13 06:01:16

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: Mouse buttons customization

I'm appreciating you great help. But any attempt to modify the inputs for my mouse fails  in all of the ways.
I had copied your example, the result is that I changed the accelerations, but the buttons remain unmodifiable. They behave just for Back and Forward functions.
I tried some experiment with imwheel. The buttons are seen, but nothing will do to adapt them for a different option.
I'll come back if I discover some improvement.


do it good first, it will be faster than do it twice the saint wink

Offline

Board footer

Powered by FluxBB