Gentoo Archives: gentoo-desktop

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-desktop@l.g.o
Subject: [gentoo-desktop] Re: Question : How to set per-device mouse sensitivity
Date: Mon, 01 Mar 2010 17:02:35
Message-Id: pan.2010.03.01.16.38.01@cox.net
In Reply to: [gentoo-desktop] Question : How to set per-device mouse sensitivity by Mickael Chazaux
1 Mickael Chazaux posted on Sun, 28 Feb 2010 21:52:12 +0100 as excerpted:
2
3 > I have two pointing devices, a touchpad and a Bluetooth mouse. One is
4 > usable, the other is way too fast for me to be usable. xf86-input-mouse
5 > has an interesting option, named 'Sensitivity' which basically
6 > multiplies the movement of the device by a provided float. What I want
7 > to be able to do is to set the sensitivity of my devices separately. (eg
8 > 1.0 for the touchpad, and 0.3 for the Bluetooth mouse). 'xset m' does
9 > not provide this sensitivity parameter, and acceleration is already at
10 > 1. To do that, I tried two methods : writing a xorg.conf, and using HAL
11 > rules.
12 >
13 > Using xorg.conf to hardcode values for /dev/input/mouse1 and
14 > /dev/input/mouse2 seemed to be a good approach at first, but in order to
15 > make Xorg use the Sections, one has to enable AllowEmptyInput and thus
16 > AutoAddDevices (from man xorg.conf)
17 >
18 > AutoAddDevices is what makes HAL automatically adds devices (USB mice,
19 > etc...) and I don't want to disable that.
20
21 Yeah, that's a problem there...
22
23 > So I tried to put this in /etc/hal/fdi/policy/bt-mouse-speed.fdi :
24 >
25 > <?xml version="1.0" encoding="ISO-8859-1"?> <deviceinfo version="0.2">
26 > <device>
27 > <match key="info.product" string="Bluetooth Laser Travel Mouse">
28 > <merge key="input.x11_options.Sensitivity"
29 > type="string">0.1</merge>
30 > </match>
31 > </match>
32 > </device>
33 > </deviceinfo>
34 >
35 > lshal says that about my mouse :
36 >
37 > udi =
38 > '/org/freedesktop/Hal/devices/bluetooth_acl_761ea325e_logicaldev_input'
39 > info.capabilities = {'input', 'input.mouse'} (string list)
40 > info.category = 'input' (string)
41 > info.parent = '/org/freedesktop/Hal/devices/bluetooth_acl_761ea325e'
42 > (string)
43 > info.product = 'Bluetooth Laser Travel Mouse' (string)
44 > info.subsystem = 'input' (string)
45 > info.udi =
46 > '/org/freedesktop/Hal/devices/bluetooth_acl_761ea325e_logicaldev_input'
47 > (string)
48 > input.device = '/dev/input/event12' (string)
49 > input.originating_device =
50 > '/org/freedesktop/Hal/devices/bluetooth_acl_761ea325e' (string)
51 > input.product = 'Bluetooth Laser Travel Mouse' (string)
52 > input.x11_driver = 'evdev' (string)
53 > linux.device_file = '/dev/input/event12' (string)
54 > linux.hotplug_type = 2 (0x2) (int)
55 > linux.subsystem = 'input' (string)
56 > linux.sysfs_path =
57 > '/sys/devices/pci0000:00/0000:00:1d.2/usb7/7-2/7-2:1.0/bluetooth/hci0/
58 > hci0:11/input16/event12' (string)
59 >
60 >
61 > I don't have a big experience in writing hal rules, and I can't figure
62 > out why they don't work as expected. That's why I ask this question here
63 > :
64 > How can I set the mouse sensitivity on a per-device basis?
65
66 Note that the hal default is evdev for both mice and keyboards. See that
67 input.x11_driver parameter? evdev. Yet you don't say anything about
68 whether evdev has that same sensitivity parameter.
69
70 Checking the evdev manpage, I don't see anything like that, BUT...
71
72 Checking the xorg.conf manpage, InputDevice section, I see the
73 "ConstantDeceleration" option. That looks to be what you want. (FWIW,
74 those are the manpages for xorg-server-1.7.5. If you're on stable you'll
75 likely be rather more stale than that, as of a week or so ago when I last
76 synced... equery says latest stable is 1.6.5-r1.
77
78 Then, as you were already doing above, you can use an x11_options based
79 key in your *.fdi.
80
81 The other alternative would be to use the (probably compressed)
82 use-mouse-driver.fdi file from hal's doc dir (/usr/share/doc/hal-
83 version/), to switch to the mouse driver instead of the evdev driver. But
84 that's discouraged as a last resort. However, since hal is deprecated and
85 they're eventually switching to something else anyway, it may be that just
86 using the mouse driver until hal itself goes away is a reasonable solution.
87
88 --
89 Duncan - List replies preferred. No HTML msgs.
90 "Every nonfree program has a lord, a master --
91 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-desktop] Re: Question : How to set per-device mouse sensitivity Mickael Chazaux <mickael.chazaux@×××××.com>