Difference between revisions of "Mouse acceleration"

From ArchWiki
Jump to: navigation, search
m (Disabling mouse acceleration)
(Disabling mouse acceleration)
Line 96: Line 96:
 
{{File|name=/etc/X11/xorg.conf.d/50-mouse-acceleration.conf|content=<nowiki>
 
{{File|name=/etc/X11/xorg.conf.d/50-mouse-acceleration.conf|content=<nowiki>
 
Section "InputClass"
 
Section "InputClass"
        Identifier "Mouse"
+
Identifier "generic mouse"
 
Option "AccelerationProfile" "-1"
 
Option "AccelerationProfile" "-1"
 
Option "AccelerationScheme" "none"
 
Option "AccelerationScheme" "none"
 
EndSection
 
EndSection
 
</nowiki>}}
 
</nowiki>}}

Revision as of 20:13, 10 August 2011

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

There are several ways of setting mouse acceleration:

  1. by editing xorg configuration files
  2. the Template:Package Official package provides two programs that can be used to change those settings from a shell or a script:
  3. many Desktop Environments provide a configuration GUI for mouse settings. They should be easy to find and use.


Setting mouse acceleration

In xorg configuration

See Template:Codeline for details.

Examples:

Template:File

Template:File

You can also assign settings to specific hardware by using "MatchProduct", "MatchVendor" and other matches inside class sections.

Using xset

To get the current values, use:

xset q | grep -A 1 Pointer

To set new values, type:

xset m ACCELERATION THRESHOLD

where ACCELERATION defines how many times faster the cursor will move than the default speed, when the cursor moves more than THRESHOLD pixels in a short time. ACCELERATION can be a fraction, so if you want to slow down the mouse you can use 1/2, and if 3 is slightly too fast, but 2 is too slow, you can use 5/2, etc.

To get the default settings back:

xset m default

For more info see Template:Codeline.

To make it permanent, edit xorg configuration (see above) or add commands to xprofile. The latter won't affect speed in a Display Manager.

Using xinput

First, get a list of devices plugged in (ignore any virtual pointers):

xinput list

Take not of the ID. You may also use the full name in commands if the ID is prone to changing.

Get a list of available properties and their current values available for modification with

xinput list-props 9

where Template:Codeline is the ID of the device you wish to use. Or

xinput list-props 'Bobs mouse brand'

where Template:Codeline is the name of your mouse given by Template:Codeline

Example, changing the property of Template:Codeline to 2:

$ xinput list-props 9
Device 'Bobs mouse brand':
       Device Enabled (121):   1
       Device Accel Profile (240):     0
       Device Accel Constant Deceleration (241):       1.000000
       Device Accel Adaptive Deceleration (243):       1.000000
       Device Accel Velocity Scaling (244):    10.000000
$ xinput --set-prop 'Bobs mouse brand' 'Device Accel Constant Deceleration' 2

To make it permanent, edit xorg configuration (see above) or add commands to xprofile. The latter won't affect speed in a Display Manager.

Disabling mouse acceleration

Mouse acceleration has changed dramatically in recent X server versions, using Template:Codeline to disable acceleration doesn't work as it used to and is not recommended anymore.

Recent changes on Template:Codeline can be read here.

To completely disable any sort of acceleration/deceleration, create the following file: Template:File