Click to See Complete Forum and Search --> : Four Button Logitech Mouse on Debian


elyk53
12-15-2006, 10:11 PM
I've got a four button Logitech Cordless Click! optical mouse; in addition to the left and right click buttons and the wheel button, it has a configurable fourth button. On my windows xp system, this fourth button acts as a back button in browser and explorer windows. However, on my debian system, it acts the same as the wheel button. Running xev shows that both buttons are considered by the system to be button 2. What do I need to change to make the system see this button as separate from the wheel function, and how do I configure it as a back button?
I am running Debian Etch (testing), and the mouse section of my xorg.conf file contains:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
EndSection

mrrangerman43
12-16-2006, 06:39 AM
I'm using Gentoo with a ms mouse 5button this is my xorg.conf

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
EndSection

XiaoKJ
12-16-2006, 06:43 AM
google for multi-button mouse and linux, and I saw the gems I wanted: ZAxisMapping and Buttons options.

Well, the wheel is usually known as Option ZAxisMapping "4 5" and the other buttons can be modified too

mrrangerman43
12-16-2006, 08:02 AM
XiaoKJ

Your right, I myself should have taken a bit more time to read his post, and given a more HELPFUL answer.


elyk53

Welcome to Justlinux, you will find that the people here are very helpful, but you should try searching the forums and other places to see if you can find a answer to your question. www.google.com/linux is a very good place to search also, by you searching it will help you to learn linux, and if you find you just can't find a answer to your question post here. ;)

I took your heading "Four Button Logitech Mouse on Debian" and did a quick search on google.com/linux and this (http://www.google.com/linux?hl=en&lr=&q=Four+Button+Logitech+Mouse+on+Debian&btnG=Search) is what came up. The first result (http://linuxreviews.org/howtos/xfree/mouse/) looks like it will have what you need. And again Welcome.

XiaoKJ
12-16-2006, 12:41 PM
XiaoKJ

Your right, I myself should have taken a bit more time to read his post, and given a more HELPFUL answer.

Nah... thats fine... Nobody has all the time in the world to read the infinite requests for help. I'm reading a bit more because I'm rather free now (holidays).

And you went more than me to help too. :)

elyk53
12-17-2006, 01:28 AM
First of all, I had done a large amount of searching before coming here (in fact, I found this forum in the search results), with a variety of search terms and no luck, but I did not know about google linux search, which is probably why it didn't work. Thanks for showing me that useful tool. And I thought I had discovered all of google's services.
Secondly, thanks for your suggestions. I tried all the steps in that article, and did further searching, but with no luck. The root of the problem seems to be that debian sees the back and wheel buttons on my mouse as one and the same; as far as it's concerned I've got a five button mouse. So any change I make to the keymapping effects either both or neither of them. Is there a more specific driver or protocal change that I could try to make the os see the two buttons as separate?
Thanks

mrrangerman43
12-17-2006, 08:41 AM
elyk53

Remapping the "buttons".

Strangely, XFree86 requires the mousewheel buttons to be the last who on the mouse. Some mice, like the 4 button Logitech Cordless Desktop Pro mouse, uses buttons 4 and 5 for the mousewheel. This means that if you use "ZAxisMapping" "4 5", what is the correct setup, the last button will be unusable. Instead, use a normal configuration. An example:

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Device" "/dev/mouse"
Option "Protocol" "MouseManPlusPS/2"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "5 6"
Option "Buttons" "6"
EndSection

(This example configuration is for a 4 (6) button Logitech Cordless Desktop Pro Mouse)

This makes all the buttons usable, but the mousewheel is mapped all wrong. Scrolling down gives up, and the last (side) button functions as the down part of the mousewheel.

To solve this, use xmodmap -e "pointer = values" to remap the buttons in of your desktop init scripts (usually placed in /etc/X11/xdm/Xsession. You can also use /opt/kde/startkde or /usr/bin/startkde if you are using KDE, /usr/bin/gnome-session if you use Gnome. To find out where your startkde, Xsession or whatever is, type 'locate startkde'. locate is a very good tool to locate files). A valid xmodmap command:

xmodmap -e "pointer = 1 6 3 2 4 5"

This remaps the mousewheel correct, and also remaps button three to button six. If this does not work with your mouse, then read the xmodmap manual page and experiment. You might even find the right values by reading your mouses manual, if it came with such a thing.

This part of the link I provided didn't help? Take a look at the man page for xmodmap, from a command line type man xmodmap and read the man page.

Dan

elyk53
12-18-2006, 12:47 AM
I tried xmodmap with pretty much every combination possible. That's how I determined that the system is viewing the back button and the wheel button as one and the same; no matter what I changed, the wheel and back button did the same thing, and nothing performed whatever action 6 was mapped to.