This is an old revision of the document!
Table of Contents
Ubuntu - Mouse - Determine the Mouse Properties
Determine the Mouse to use
xinput | grep -m 1 "DeathAdder" | sed 's/^.*id=\([0-9]*\)[ \t].*$/\1/'
returns:
8
NOTE: See Determine the Mouse.
- This shows that the id of the mouse is 8 in this case.
- The id is needed, as the name of the mouse is not unique.
- Trying to use the name, might return an error:
xinput --list-props "Razer Razer DeathAdder V2"
- returns:
Warning: There are multiple devices matching 'Razer Razer DeathAdder V2'. To ensure the correct one is selected, please use the device ID, or prefix the device name with 'pointer:' or 'keyboard:' as appropriate. unable to find device Razer Razer DeathAdder V2
List the Mouse Properties
xinput list-props 8
returns:
Device 'Razer Razer DeathAdder V2': Device Enabled (155): 1 Coordinate Transformation Matrix (157): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Natural Scrolling Enabled (291): 0 libinput Natural Scrolling Enabled Default (292): 0 libinput Scroll Methods Available (293): 0, 0, 1 libinput Scroll Method Enabled (294): 0, 0, 0 libinput Scroll Method Enabled Default (295): 0, 0, 0 libinput Button Scrolling Button (296): 2 libinput Button Scrolling Button Default (297): 2 libinput Middle Emulation Enabled (298): 0 libinput Middle Emulation Enabled Default (299): 0 libinput Accel Speed (300): 0.698529 libinput Accel Speed Default (301): 0.000000 libinput Accel Profiles Available (302): 1, 1 libinput Accel Profile Enabled (303): 1, 0 libinput Accel Profile Enabled Default (304): 1, 0 libinput Left Handed Enabled (305): 0 libinput Left Handed Enabled Default (306): 0 libinput Send Events Modes Available (276): 1, 0 libinput Send Events Mode Enabled (277): 0, 0 libinput Send Events Mode Enabled Default (278): 0, 0 Device Node (279): "/dev/input/event7" Device Product ID (280): 5426, 132 libinput Drag Lock Buttons (307): <no items> libinput Horizontal Scroll Enabled (308): 1
NOTE: The id of 8 is used as determined by the previous step, Determine the Mouse.
- libinput is an Xorg input driver based on libinput.
- It therefore supports all input devices that libinput can handle, including most mice, keyboards, tablets and touchscreens.
Descriptions of the Mouse Properties
libinput exports runtime-configurable options as properties. If a property listed below is not available, the matching configuration option is not available on the device. This however does not imply that the feature is not available on the device. The following properties are provided by the libinput driver.
Property | Description |
---|---|
Coordinate Transformation Matrix | This is a 3×3 coordinate transformation matrix. It is encoded in row-major order, so the matrix would look like the following in a text book: |
⎡ 1 0 0 ⎤ | |
⎜ 0 1 0 ⎥ | |
⎣ 0 0 1 ⎦ | |
libinput Accel Profiles Available | 2 boolean values (8 bit, 0 or 1), in order “adaptive”, “flat”. Indicates which acceleration profiles are available on this device. |
libinput Accel Profile Enabled | 2 boolean values (8 bit, 0 or 1), in order “adaptive”, “flat”. Indicates which acceleration profile is currently enabled on this device. |
libinput Accel Speed | 1 32-bit float value, defines the pointer speed. Value range -1, 1 |
libinput Button Scrolling Button | 1 32-bit value. Sets the button number to use for button scrolling. This setting is independent of the scroll method, to enable button scrolling the method must be set to button-scrolling and a valid button must be set. |
libinput Button Scrolling Button Lock Enabled | 1 boolean value. If true, the scroll button lock is enabled. This setting is independent of the scroll method or the scroll button, to enable button scrolling the method must be set to button-scrolling and a valid button must be set. |
libinput Calibration Matrix | 9 32-bit float values, representing a 3×3 calibration matrix, order is row 1, row 2, row 3 |
libinput Click Methods Available | 2 boolean values (8 bit, 0 or 1), in order “buttonareas”, “clickfinger”. Indicates which click methods are available on this device. |
libinput Click Methods Enabled | 2 boolean values (8 bit, 0 or 1), in order “buttonareas”, “clickfinger”. Indicates which click methods are enabled on this device. |
libinput Drag Lock Buttons | Either one 8-bit value specifying the meta drag lock button, or a list of button pairs. See section Button Drag Lock for details. |
libinput Horizontal Scrolling Enabled | 1 boolean value (8 bit, 0 or 1). Indicates whether horizontal scrolling events are enabled or not. |
libinput Left Handed Enabled | 1 boolean value (8 bit, 0 or 1). Indicates if left-handed mode is enabled or disabled. |
libinput Middle Emulation Enabled | 1 boolean value (8 bit, 0 or 1). Indicates if middle emulation is enabled or disabled. |
libinput Natural Scrolling Enabled | 1 boolean value (8 bit, 0 or 1). 1 enables natural scrolling. |
libinput Rotation Angle | 1 32-bit float value [0.0 to 360.0). Sets the rotation angle of the device, clockwise of its natural neutral position. |
libinput Scroll Methods Available | 3 boolean values (8 bit, 0 or 1), in order “two-finger”, “edge”, “button”. Indicates which scroll methods are available on this device. |
libinput Scroll Method Enabled | 3 boolean values (8 bit, 0 or 1), in order “two-finger”, “edge”, “button”. Indicates which scroll method is currently enabled on this device. |
libinput Scroll Pixel Distance | 1 32-bit value (nonzero, with additional implementation-defined range checks). Changes the movement distance required to trigger one logical wheel click. |
libinput Send Events Modes Available | 2 boolean values (8 bit, 0 or 1), in order “disabled” and “disabled-on-external-mouse”. Indicates which send-event modes are available on this device. |
libinput Send Events Mode Enabled | 2 boolean values (8 bit, 0 or 1), in order “disabled” and “disabled-on-external-mouse”. Indicates which send-event modes is currently enabled on this device. |
libinput Tablet Tool Pressurecurve | 4 32-bit float values [0.0 to 1.0]. See section TABLET TOOL PRESSURE CURVE. |
libinput Tablet Tool Area Ratio | 2 32-bit values, corresponding to width and height. Special value 0, 0 resets to the default ratio. See section Tablet Tool Area Ratio for more information. |
libinput Tapping Enabled | 1 boolean value (8 bit, 0 or 1). 1 enables tapping. |
libinput Tapping Button Mapping Enabled | 2 boolean value (8 bit, 0 or 1), in order “lrm” and “lmr”. Indicates which button mapping is currently enabled on this device. |
libinput Tapping Drag Lock Enabled | 1 boolean value (8 bit, 0 or 1). 1 enables drag lock during tapping. |
libinput Disable While Typing Enabled | 1 boolean value (8 bit, 0 or 1). Indicates if disable while typing is enabled or disabled. |
NOTE: Most properties have a libinput <property name> Default equivalent that indicates the default value for this setting on this device.
Tablet Tool Pressurecurve
The pressure curve affects how stylus pressure is reported.
- By default, the hardware pressure is reported as-is.
- By setting a pressure curve, the feel of the stylus can be adjusted to be more like e.g. a pencil or a brush.
The pressure curve is a cubic Bezier curve, drawn within a normalized range of 0.0 to 1.0 between the four points provided.
- This normalized range is applied to the tablets pressure input so that the highest pressure maps to 1.0.
- The points must have increasing x coordinates, if x0 is larger than 0.0 all pressure values lower than x0 are equivalent to y0.
- If x3 is less than 1.0, all pressure values higher than x3 are equivalent to y3.
The input for a linear curve (default) is “0.0/0.0 0.0/0.0 1.0/1.0 1.0/1.0”;
- a slightly depressed curve (firmer) might be “0.0/0.0 0.05/0.0 1.0/0.95 1.0/1.0”;
- a slightly raised curve (softer) might be “0.0/0.0 0.0/0.05 0.95/1.0 1.0/1.0”.
This feature is provided by this driver, not by libinput.