Mouse 3rd Button [Solved]

Issues Related to Hardware (Sound, Video, Printers, Scanners, Webcams, Touchpads, Keyboards, Sensors, Drives, GRUB, etc.)

Moderator: Moderators

Mouse 3rd Button [Solved]

Postby BHReach » Mon Mar 07, 2011 23:15

I have a 2 button mouse. There is a way to press both buttons simultaneously and have that behave as the 3rd button.

Sabayon 5.5 by default does not have that feature enabled.

Does anyone know how to enable that feature?

I use gpm in the console and icewm in X Windows if that makes a difference.
Growing Hen
Posts: 193
Joined: Thu Jan 31, 2008 20:40

Re: [Solved]Mouse 3rd Button

Postby BHReach » Tue Mar 08, 2011 14:41

I figured out how to emulate the 3rd button.

It took several hours of SWAGs, WAGs and research to get it.

For gpm, I forgot that the right mouse button pastes. That works fine by default.

For X it is more complex. Originally the X configuration was in /etc/X11/xorg.conf. Then they migrated to using HAL and you had to write hal policy rules to configure X. Now they have migrated to udev but you do not have to write udev rules to configure X.

There are several configuration files that X reads when auto configuring hardware. I will only mention /etc/X11/xorg.conf because that is the recommended way to customize your X configuration.

X can auto detect and configure most hardware correctly and you may not need an xorg.conf file at all. X reads the xorg.conf last so its contents will override the other configuration files and whatever X figured out on its own. The file format has changed slightly. You have to add the word "Class" to the section names.

I added these lines to my /etc/X11/xorg.conf file and it added 3 button emulation:

Section "InputClass"
Identifier "mouse0"
MatchProduct "PS/2 Logitech Mouse"
Option "Emulate3Buttons" "on"

The identifier can be any string. MatchProduct is the hal product ID / udev product name (they are the same). That section tells X to turn 3 button emulation on for the PS/2 Logitech Mouse it detected.
Growing Hen
Posts: 193
Joined: Thu Jan 31, 2008 20:40

Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest