Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] mouse button mapping with evdev+hal+xorg-1.5.3

32 views
Skip to first unread message

Valmor de Almeida

unread,
May 8, 2009, 3:50:11 PM5/8/09
to

Hello,

After an evdev+hal+xorg-1.5.3 upgrade, I suppose I don't need a input
device section for a mouse in my xorg.conf. (I do need xorg.conf so I
can get an external monitor working with my laptop correctly). However I
would like to reverse the order of the buttons and this old xorg.conf
section does not do it:

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
Option "ButtonMapping" "3 2 1"
EndSection

My driver now is evdev but how about the device driver line? still
/dev/.../mice? or something else out of the lshal output?

info.product = 'Microsoft Basic Optical Mouse' (string)
info.subsystem = 'input' (string)
info.udi =
'/org/freedesktop/Hal/devices/usb_device_45e_83_noserial_if0_logicaldev_input'
(string)
input.device = '/dev/input/event7' (string)

Thanks,

--
Valmor

Valmor de Almeida

unread,
May 8, 2009, 6:10:11 PM5/8/09
to

Okay. If I do

Driver "evdev"
Option "Device" "/dev/input/event7"

it works. However the touchpad which is event9 does not reverse buttons
(as expected). Do I need to configure a second input device and point it
to the appropriate event? Is this the right way of configuring
evdev/xorg through hal?

Thanks,

--
Valmor

ABCD

unread,
May 8, 2009, 9:40:09 PM5/8/09
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Valmor de Almeida wrote:
> Valmor de Almeida wrote:
>> Hello,
>>
>> After an evdev+hal+xorg-1.5.3 upgrade, I suppose I don't need a input
>> device section for a mouse in my xorg.conf. (I do need xorg.conf so I
>> can get an external monitor working with my laptop correctly). However I
>> would like to reverse the order of the buttons and this old xorg.conf
>> section does not do it:
>>
>> Section "InputDevice"
>> Identifier "Mouse0"
>> Driver "mouse"
>> Option "Protocol" "auto"
>> Option "Device" "/dev/input/mice"
>> Option "ZAxisMapping" "4 5 6 7"
>> Option "ButtonMapping" "3 2 1"
>> EndSection
>>
>> My driver now is evdev but how about the device driver line? still
>> /dev/.../mice? or something else out of the lshal output?
>>
>> info.product = 'Microsoft Basic Optical Mouse' (string)
>> info.subsystem = 'input' (string)
>> info.udi =
>> '/org/freedesktop/Hal/devices/usb_device_45e_83_noserial_if0_logicaldev_input'
>> (string)
>> input.device = '/dev/input/event7' (string)
>>
>

> Okay. If I do
>
> Driver "evdev"
> Option "Device" "/dev/input/event7"
>
> it works. However the touchpad which is event9 does not reverse buttons
> (as expected). Do I need to configure a second input device and point it
> to the appropriate event? Is this the right way of configuring
> evdev/xorg through hal?
>

As I understand it, everything that can be done in xorg.conf can be done
via HAL, but I'm not sure how you would do so for the video devices.
That said, you should be able to completely get rid of the input devices
in xorg.conf, and instead install this in a file in /etc/hal/fdi/policy:

- --- 8< --- /etc/hal/fdi/policy/99-local.fdi --- >8 ---
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.mouse">
<merge key="input.x11_driver" type="string">evdev</merge>
<merge key="input.x11_options.ZAxisMapping" type="string">4 5 6 7</merge>
<merge key="input.x11_options.ButtonMapping" type="string">3 2 1</merge>
</match>
</device>
</deviceinfo>
- --- 8< --- /etc/hal/fdi/policy/99-local.fdi --- >8 ---

This sets the options for each device that has the "input.mouse"
capability to the same values you had in xorg.conf.

- --
ABCD
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoE3RsACgkQOypDUo0oQOoW0gCaA0OWFsV48eA4nQNGkSED8JOL
8eEAoI9aJ12kWRezJSMmdTTkI6f6VwKz
=xiXE
-----END PGP SIGNATURE-----

Valmor de Almeida

unread,
May 11, 2009, 1:20:10 PM5/11/09
to
ABCD wrote:

>
> As I understand it, everything that can be done in xorg.conf can be done
> via HAL, but I'm not sure how you would do so for the video devices.
> That said, you should be able to completely get rid of the input devices
> in xorg.conf, and instead install this in a file in /etc/hal/fdi/policy:
>

> --- 8< --- /etc/hal/fdi/policy/99-local.fdi --- >8 ---
> <?xml version="1.0" encoding="UTF-8"?>
> <deviceinfo version="0.2">
> <device>
> <match key="info.capabilities" contains="input.mouse">
> <merge key="input.x11_driver" type="string">evdev</merge>
> <merge key="input.x11_options.ZAxisMapping" type="string">4 5 6 7</merge>
> <merge key="input.x11_options.ButtonMapping" type="string">3 2 1</merge>
> </match>
> </device>
> </deviceinfo>

> --- 8< --- /etc/hal/fdi/policy/99-local.fdi --- >8 ---
>
> This sets the options for each device that has the "input.mouse"
> capability to the same values you had in xorg.conf.
>

This partially solved the problem. The optical mice were correctly
configured but the quick pointing device on the laptop keyboard was not.
That is the left/right buttons were not switched. HAL does list (below)
the device in two entries that contain the input.mouse keyword.

I find it difficult to get info on configuring HAL devices on the web;
do I need to join a mailing list? It would be helpful to find some
examples of the naming of the fdi files their contents that go under the
/etc/hal/*/policy/ directory.

Thanks for the help and any other additional inputs.

--
Valmor

udi =
'/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port_logicaldev_input_0'
info.capabilities = {'input', 'input.mouse', 'input.touchpad'} (string
list)
info.category = 'input' (string)
info.parent =
'/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port' (string)
info.product = 'AlpsPS/2 ALPS DualPoint TouchPad' (string)


info.subsystem = 'input' (string)
info.udi =

'/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port_logicaldev_input_0'
(string)
input.device = '/dev/input/event8' (string)
input.originating_device =
'/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port' (string)
input.product = 'AlpsPS/2 ALPS DualPoint TouchPad' (string)
input.x11_driver = 'evdev' (string)
linux.device_file = '/dev/input/event8' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'input' (string)
linux.sysfs_path =
'/sys/devices/platform/i8042/serio4/input/input8/event8' (string)

udi =
'/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port_logicaldev_input'
info.capabilities = {'input', 'input.mouse'} (string list)
info.category = 'input' (string)
info.parent =
'/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port' (string)
info.product = 'DualPoint Stick' (string)


info.subsystem = 'input' (string)
info.udi =

'/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port_logicaldev_input'


(string)
input.device = '/dev/input/event7' (string)

input.originating_device =
'/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port' (string)
input.product = 'DualPoint Stick' (string)
input.x11_driver = 'evdev' (string)
linux.device_file = '/dev/input/event7' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'input' (string)
linux.sysfs_path =
'/sys/devices/platform/i8042/serio4/input/input7/event7' (string)

ABCD

unread,
May 12, 2009, 3:20:18 AM5/12/09
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Valmor de Almeida wrote:
>
> This partially solved the problem. The optical mice were correctly
> configured but the quick pointing device on the laptop keyboard was not.
> That is the left/right buttons were not switched. HAL does list (below)
> the device in two entries that contain the input.mouse keyword.
>
> I find it difficult to get info on configuring HAL devices on the web;
> do I need to join a mailing list? It would be helpful to find some
> examples of the naming of the fdi files their contents that go under the
> /etc/hal/*/policy/ directory.
>
> Thanks for the help and any other additional inputs.
>

If I remember correctly, the names of the files under
/etc/hal/fdi/policy/ is irrelevant, so long as they end in ".fdi". They
are simply used in ASCIIbetical order, which is why many of the file
names begin with two digits, so as to facilitate sorting. Also, it
appears that you might not have restarted hal after adding the file -
try "/etc/init.d/hald restart", then restart X. Also, after doing so,
if it doesn't work, reply with the full output of `lshal` (yes, I know
it's long, but it can be helpful. Also, again if it doesn't work, send
the contents of all files under /etc/hal/fdi/policy/.

- --
ABCD
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoJIJEACgkQOypDUo0oQOrSHwCggMhVx5VpH7pCPnifxhNxnmpy
+dAAnigGdrpW9a6aIriyWNdHewJqCow2
=Alwq
-----END PGP SIGNATURE-----

Valmor de Almeida

unread,
May 12, 2009, 8:40:10 PM5/12/09
to
ABCD wrote:

> names begin with two digits, so as to facilitate sorting. Also, it
> appears that you might not have restarted hal after adding the file -
> try "/etc/init.d/hald restart", then restart X. Also, after doing so,
> if it doesn't work, reply with the full output of `lshal` (yes, I know
> it's long, but it can be helpful. Also, again if it doesn't work, send
> the contents of all files under /etc/hal/fdi/policy/.
>

Indeed. After a restart, all fine. Thanks,

--
Valmor

0 new messages