[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-desktop
Subject:    [gentoo-desktop] Re: Question : How to set per-device mouse sensitivity
From:       Duncan <1i5t5.duncan () cox ! net>
Date:       2010-03-01 16:38:02
Message-ID: pan.2010.03.01.16.38.01 () cox ! net
[Download RAW message or body]

Mickael Chazaux posted on Sun, 28 Feb 2010 21:52:12 +0100 as excerpted:

> I have two pointing devices, a touchpad and a Bluetooth mouse. One is
> usable, the other is way too fast for me to be usable. xf86-input-mouse
> has an interesting option, named 'Sensitivity' which basically
> multiplies the movement of the device by a provided float. What I want
> to be able to do is to set the sensitivity of my devices separately. (eg
> 1.0 for the touchpad, and 0.3 for the Bluetooth mouse). 'xset m' does
> not provide this sensitivity parameter, and acceleration is already at
> 1. To do that, I tried two methods : writing a xorg.conf, and using HAL
> rules.
> 
> Using xorg.conf to hardcode values for /dev/input/mouse1 and
> /dev/input/mouse2 seemed to be a good approach at first, but in order to
> make Xorg use the Sections, one has to enable AllowEmptyInput and thus
> AutoAddDevices (from man xorg.conf)
> 
> AutoAddDevices is what makes HAL automatically adds devices (USB mice,
> etc...) and I don't want to disable that.

Yeah, that's a problem there...

> So I tried to put this in /etc/hal/fdi/policy/bt-mouse-speed.fdi :
> 
> <?xml version="1.0" encoding="ISO-8859-1"?> <deviceinfo version="0.2">
>   <device>
>         <match key="info.product" string="Bluetooth Laser Travel Mouse">
>                <merge key="input.x11_options.Sensitivity"
> type="string">0.1</merge>
>         </match>
>     </match>
>   </device>
> </deviceinfo>
> 
> lshal says that about my mouse :
> 
> udi =
> '/org/freedesktop/Hal/devices/bluetooth_acl_761ea325e_logicaldev_input'
>   info.capabilities = {'input', 'input.mouse'} (string list)
>   info.category = 'input'  (string)
>   info.parent = '/org/freedesktop/Hal/devices/bluetooth_acl_761ea325e' 
> (string)
>   info.product = 'Bluetooth Laser Travel Mouse'  (string)
>   info.subsystem = 'input'  (string)
>   info.udi =
> '/org/freedesktop/Hal/devices/bluetooth_acl_761ea325e_logicaldev_input'
> (string)
>   input.device = '/dev/input/event12'  (string)
>   input.originating_device =
> '/org/freedesktop/Hal/devices/bluetooth_acl_761ea325e'  (string)
>   input.product = 'Bluetooth Laser Travel Mouse'  (string)
>   input.x11_driver = 'evdev'  (string)
>   linux.device_file = '/dev/input/event12'  (string)
>   linux.hotplug_type = 2  (0x2)  (int)
>   linux.subsystem = 'input'  (string)
>   linux.sysfs_path =
> '/sys/devices/pci0000:00/0000:00:1d.2/usb7/7-2/7-2:1.0/bluetooth/hci0/
> hci0:11/input16/event12'  (string)
> 
> 
> I don't have a big experience in writing hal rules, and I can't figure
> out why they don't work as expected. That's why I ask this question here
> :
> How can I set the mouse sensitivity on a per-device basis?

Note that the hal default is evdev for both mice and keyboards.  See that 
input.x11_driver parameter?  evdev.  Yet you don't say anything about 
whether evdev has that same sensitivity parameter.

Checking the evdev manpage, I don't see anything like that, BUT...

Checking the xorg.conf manpage, InputDevice section, I see the 
"ConstantDeceleration" option.  That looks to be what you want.  (FWIW, 
those are the manpages for xorg-server-1.7.5.  If you're on stable you'll 
likely be rather more stale than that, as of a week or so ago when I last 
synced... equery says latest stable is 1.6.5-r1.

Then, as you were already doing above, you can use an x11_options based 
key in your *.fdi.

The other alternative would be to use the (probably compressed)
use-mouse-driver.fdi file from hal's doc dir (/usr/share/doc/hal-
version/), to switch to the mouse driver instead of the evdev driver.  But 
that's discouraged as a last resort.  However, since hal is deprecated and 
they're eventually switching to something else anyway, it may be that just 
using the mouse driver until hal itself goes away is a reasonable solution.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic