ubuntu:mouse:change_mouse_properties
This is an old revision of the document!
Table of Contents
Ubuntu - Mouse - Change Mouse Properties
The libinput library handles most input events on a system.
- It can process input events on both Wayland and X and can handle a variety of input devices including touchscreen displays and stylus pens.
It is recommended that libinput devices are configured through the InputClass directive.
Determine the Mouse
List the Mouse Properties
xinput list-props 8
returns:
Device 'Razer Razer DeathAdder V2': libinput Natural Scrolling Enabled (291): 0 ...
Change Properties of a Connected Device
For example, change the Natural Scrolling Enabled property.
xinput set-prop 8 291 0 xinput set-prop 8 291 1
NOTE:
- 8: is the id of the mouse as determined by the previous step, Determine the Mouse.
- 291: is from the List the Mouse Properties referring to the Natural Scrolling Enabled property.
- 0: disables natural scrolling while “1” enables it.
Using an ID is not a reliable way to change a property, as these may change. A better approach is to use the full property identifier:
xinput set-prop 8 "libinput Natural Scrolling Enabled" 0 xinput set-prop 8 "libinput Natural Scrolling Enabled" 1
WARNING: Do not try to change any property having the word Default in it.
- These are reference fallback values and any attempt to change them will result in xinput throwing an error.
Making the Changes Persistent
The method explained above changes settings for active session only.
- When the system is rebooted, these changes will be gone.
To make them persistent, two approaches can be used.
- Add these commands to startup applications.
- Create a config file in /etc/X11/xorg.conf.d/.
Option 1
sleep 3 && xinput set-prop "Razer Razer DeathAdder V2" "libinput Natural Scrolling Enabled" 1
NOTE: The sleep 3 is a delay to wait for the session to load properly.
Option 2
ubuntu/mouse/change_mouse_properties.1635255000.txt.gz · Last modified: 2021/10/26 13:30 by peter