# Extra buttons of the MX1000

## Jonas Witt

Hi,

today I got my new Logitech MX1000. First I have to say that I'm impressed by this nice mouse. Now I am trying to get the extra buttons to work in X11, which does not seem to be easy.

Whatever I try, the 3 buttons on the left side only produce mouse events with button = [1,2,3], and the two buttons beside the wheel only produce events 4 and 5, which lets you use them like a scroll wheel. However, I can't get them to produce 'their own' events. From my xorg.conf:

```
Section "InputDevice"

 Identifier  "Mouse1"

 Driver      "mouse"

 Option "Protocol"    "IMPS/2"

 Option "Device"      "/dev/input/mice"

 Option "ZAxisMapping"       "6 7"

 Option "Buttons" "7"

EndSection
```

Has anyone already made experiences with this mouse and got the buttons to work?

----------

## MetatronX99

http://www.linux-gamers.net/modules/wfsection/article.php?articleid=46

try that out for size. 

Cheers.

----------

## bastiaannaber

I also bought an MX1000 today and I am very pleased with it! I got all 12! buttons working by putting the following in my /etc/X11/XF86Config-4 (I am a debian user)

```

Section "InputDevice"

        Identifier      "Configured Mouse"

        Driver          "mouse"

        Option          "Protocol"      "evdev"

        Option          "Dev Name"      "Logitech USB Receiver" #cat /proc/bus/input/devices

        Option          "Dev Phys"      "usb-0000:00:03.1-1/input0" #cat /proc/bus/input/devices

        Option          "Device"        "/dev/input/mice" # Choose the correct input event here.

        Option          "Buttons"       "12"

        Option          "ZAxisMapping"  "11 12"

        Option          "Resolution"   "800"

        Option          "CorePointer"

EndSection

```

After that I did:

```
xmodmap -e "pointer = 1 2 3 11 12 6 7 8 9 10 4 5" 
```

You probably will want imwheel to do something usefull with the other buttons.

----------

## scoobydu

Think I'll wait for the bluetooth puppy to come out  :Wink: 

Nice mouse though, what are you going to do with all those buttons!

----------

## Jonas Witt

I tried bastiannaber's solution, but my xorg-x11-6.7.0 doesn't know the protocol 'evdev'. I think that I am missing the event device support; does anyone know how I get this?

@bastiannaber: Which kernel do you use? It looks like 2.6 to me. 

@MatatronX99: This is about the solution I tried. But I will try to use protocol explorerps/2.

----------

## Jonas Witt

Now I have

```
Section "InputDevice"

        Identifier      "MX1000_2"

        Driver          "mouse"

        Option          "Protocol"      "ExplorerPS/2"

        Option          "Device"        "/dev/input/mice" # Choose the correct i

nput event here.

        Option          "Buttons"       "12"

        Option          "ZAxisMapping"  "11 12"

        Option          "Resolution"   "800"

        Option          "CorePointer"

EndSection 
```

And without any xmodmap -e "pointer = ..." modifications I get 11 and 12 on the wheel, 4 and none on the two wheel buttons, none for the horizontal wheel, and 4, 1, 5 on the left side buttons. This means that I can at least map 11 and 12 to the forward and backward buttons.

----------

## Archangel1

 *Jonas Witt wrote:*   

> I tried bastiannaber's solution, but my xorg-x11-6.7.0 doesn't know the protocol 'evdev'. I think that I am missing the event device support; does anyone know how I get this?
> 
> 

 

When you compile your kernel, there's an option in Input Devices for the event protocol. I suppose you might have it compiled as a module already - if it is all you'll have to do is modprobe evdev I guess. Otherwise it's a kernel recompile.

----------

## oberyno

AFAIK, you also need xorg-x11-6.7.0-r2 or newer for evdev. I have an mx700 and evdev is the only protocol that supports all the buttons, so I would imagine that evdev would be the only protocol that would properly support the mx1000.

----------

## Jonas Witt

OK, I have the evdev module now; thanks for pointing that out, Archangel1.

Anyway, oberyno is apparently right, because xorg-x11-6.7.0 won't use the evdev protocol for me. Now I have to wait a few hours to test -r2.  :Sad: 

----------

## Jonas Witt

Wow! With xorg-x11-6.7.0-r2 and evdev all 12 buttons of this great piece of hardware work. Time to fire imwheel up. Thanks, boys!

----------

## Jonas Witt

Grmpf. When using the evdev protocol, my mouse hangs about every 5 minutes. Switching to console and back solves the problem for the next few minutes. Any ideas?

----------

## Illissius

I'm using evdev with an MX500 and don't have that, so no idea what could be causing it. Isn't it just the mouse powering down to conserve batteries?

----------

## Jonas Witt

Are you using the XFree or X.org's Server?

----------

## ashtray

I just got my MX1000 today and I am wondering if anybody got it working right. All 12 buttons are working but CruiseControl returns two events: button 4,7 and 5,8. Is it possible to get horizontal scrolling?

----------

## Illissius

 *Jonas Witt wrote:*   

> Are you using the XFree or X.org's Server?

 

X.org 6.70r2

----------

## alv

 *ashtray wrote:*   

> I just got my MX1000 today and I am wondering if anybody got it working right. All 12 buttons are working but CruiseControl returns two events: button 4,7 and 5,8. Is it possible to get horizontal scrolling?

 

Could it be the same bug that I have with the new MS mouse?

https://bugs.gentoo.org/show_bug.cgi?id=62920

----------

## Jonas Witt

 *Illissius wrote:*   

>  *Jonas Witt wrote:*   Are you using the XFree or X.org's Server? 
> 
> X.org 6.70r2

 

Hm, exactly the same that I am using. I'll try other kernels, which one are you using?

To answer your last question: Yes, the mouse is powering down but comes back up very quickly. This is definitely not the problem.

Horizontal scrolling: I may be wrong, but I thought that this was not possible with Linux atm. If I am wrong, how does one achieve horizontal scrolling?

----------

## Illissius

I'm currently on 2.6.8-nitro5, but have used it with a lot of kernels without any issues (multiple iterations of nitro, 2.6.7-ck5, and a few xx-sources as well).

Note that I'm using an MX500 though.

Horizontal scrolling: X recognizes vertical scrolling as merely two extra buttons... doesn't it do the same for horizontal?

----------

## alv

 *Quote:*   

> Horizontal scrolling: I may be wrong, but I thought that this was not possible with Linux atm. If I am wrong, how does one achieve horizontal scrolling?

 

EDIT: I believe that you NEED evdev XMouse driver. IMPS/2 does not support it.

I think KDE/QT by default will treat buttons 6 7 as horizontal scroll wheel. So if you would map the wheel to those keys, it would cause the window to scroll. Try it in konq, if you have those buttons. (Konq treats 8 9, as forward back.)

EDIT: Never said how to actually do it.

Just set  ZAxisMapping to "a b c d", where a b c d are unused buttons Then proceed to use xmodmap to remap those to 4 5 6 7. This should give you side scrolling in KDE.

Funny, but it seems that this goes very much against what mozilla is doing, causing my side scrolling to be interpreted as forward and back. Not sure what it thinks of the buttons 8 9.

I am sure there is a configuration for this somewhere.   :Rolling Eyes: 

----------

## Ghostryder

Well,

I have bought the MX1000 too. I tried using the "evdev"-Protocoll, but when I use it the wheel doesn't do anything. I changed "ZAxisMapping" to different values but that doesn't change the situation.

The mouse works with ExplorerPS/2. But the horizontal buttons don't work. 

My X-Free Version is 4.3.0-r6. Has anybody got a solution for the horizontal feature? Or can anybody tell me how to use the "evdev"-Protocoll correctly....

thanks g.

----------

## alv

You should really switch to X.org....but anyway. IIRC the xfree was also patched to provide evdev, but if you get messages saying that evdev protocol is not recognized, you should upgrade to the newest xorg or xfree.

My xorg.conf (XF86Config equivalent)

Section "InputDevice"

# Identifier and driver

    Identifier  "Mouse1"

    Driver      "mouse"

# The mouse protocol and device.  The device is normally set to /dev/mouse,

# which is usually a symbolic link to the real device.

    Option      "Protocol"      "evdev"

    Option      "Device"        "/dev/input/event1"

    Option      "Buttons"       "9"

    Option      "ZAxisMapping"  "6 7 8 9"

    Option      "Dev Phys"      "usb-0000:00:10.1-1/input0"

EndSection

Dev Phys or Device need to be specified (and need to match).

Ideally you should use just the Dev Phys. That way the driver will find the right event file to use.

Buttons needs to be specified to the number of buttons + 4 for the tiltwheel.

(Your numbers will differ -- my mouse is actually MS Wireless IM Explorer v2)

The hardware will map the actual buttons into buttons 1 through X.

This means that you should pass "X+1 X+2 X+3 X+4" to the ZAxisMapping.

Sometimes the hardware will map the buttons into non-consecutive button numbers, in which case you should use the gaps. The main point is to give nonused buttons for the Zaxismapping, or you will start mixing them.

After that you should use 

```
xmodmap -e "pointer = ..."
```

to remap the buttons, so that the wheel becomes buttons 4 5, the tilt becomes buttons 6 7, and the other buttons fall in the right place as well. Notice that the tilt has no dedicated place. KDE/QT assume that tilt is 6 7, while mozilla will think that 6 7 is a forward / back. Use imwheel to assign keyboard commands to the buttons on a per application basis.

Furthermore, I am not certain whether the logitech mouse driver actually supports tiltwheel. I also do not believe that MX1000 uses the usbhid driver. So I can not tell you anything about it. If the tiltwheel is not mapped to the REL_HWHEEL event in the linux input driver, then there is no chance that it will work.

In short..you need REL_HWHEEL support in the kernel, and evdev driver to be able to use HWHEEL events to use the tilt.

Oh and please persuade people to fix this bug. https://bugs.gentoo.org/show_bug.cgi?id=62920

It is very annoying  :Crying or Very sad: . And it will affect your "scroll accelerator" buttons or whatever logitech calls them.

----------

## Ghostryder

Thanks at first for your answer!

But I don't know exactly where to get the "Dev Phys". An output of lsusb gives me that:

Bus 004 Device 002: ID 0a81:0101 Chesen Electronics Corp.

Bus 004 Device 001: ID 0000:0000

Bus 003 Device 001: ID 0000:0000

Bus 002 Device 002: ID 058f:9254 Alcor Micro Corp. Hub

Bus 002 Device 001: ID 0000:0000

Bus 001 Device 006: ID 046d:c50e Logitech, Inc.

Bus 001 Device 002: ID 05e3:0660 Genesys Logic, Inc.

Bus 001 Device 001: ID 0000:0000

Do I have to take it from here? (it looks kinda different than yours)

And "cat /dev/bus/usb/devices" gives me that:

.......

T:  Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  6 Spd=1.5 MxCh= 0

D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=046d ProdID=c50e Rev=25.00

S:  Manufacturer=Logitech

S:  Product=USB Receiver

C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 70mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid

E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

So I think the usbhid are in use... Any suggestions?

thanks a lot!

----------

## Jonas Witt

From bastiaannabers config: Try

```
cat /proc/bus/input/devices
```

----------

## Doikor

Anyone know if the mx1000 goes to 800dpi on default or does it need the logitech_applet. And does the 500hz hack work on it?

----------

## anarchist

It doesnt look like as if the logitech applet could switch the mx1000 to 800dpi, it says it does not support it

----------

## anarchist

does anyone know whether the resolution option in the xfree config does anything or not? I dont get the feeling that it does anything, im even quiet convinced that it does simply nothing

----------

## Robin79

i got a CREATIVE 5000 5 buttons and only the ordinary ones is working how can i get all five to work?

----------

## iwasbiggs

 *alv wrote:*   

>  *Quote:*   Horizontal scrolling: I may be wrong, but I thought that this was not possible with Linux atm. If I am wrong, how does one achieve horizontal scrolling? 
> 
> EDIT: I believe that you NEED evdev XMouse driver. IMPS/2 does not support it.
> 
> I think KDE/QT by default will treat buttons 6 7 as horizontal scroll wheel. So if you would map the wheel to those keys, it would cause the window to scroll. Try it in konq, if you have those buttons. (Konq treats 8 9, as forward back.)
> ...

 

Horizontal Scrolling with MX1000

I have the same XF86Config as posted in the original post.

On start up, I run:

/usr/X11R6/bin/xmodmap -e "pointer = 1 2 3 11 12 9 10 8 6 7 4 5"

Now you can scroll horizontally by tilting the wheel and up and down as usual.

My ZAxisConfig doesn't have 4 numbers. This is all that seems to be necessary for GTK. Maybe QT interprets the events differently.

----------

## koroumel

iwasbiggs what do you mean by the original config? The xmodmap you posted, is using the tilt-wheel to go forward and backward in browser history and not scroll left and right (this is what I got any way).

----------

## FFred

Ok... 

I insrtalled my MX 1000 (picked because it was the only one with more than 3 buttons and I needed to replace my mouse right away) which works fine as a 3 button mouse. Attempts to make all buttons work however have all failed.

With evdev enabled both in the kernel (2.6.7-gentoo-r11 on amd64) and in X (X.org 6.7.0-r2) I get the following when testing with xev :

After running xmodmap -e "pointer = default" to reset everything...

button 1 (left mouse) : 1

button 2 (wheel) : 2

button 3 (right button) : 3

wheel up : 9

wheel down : 10

wheel left : no event

wheel right : no event

button above wheel : 9

button below wheel : 10

forward thumb button : 5

back thumb button : 4

middle thumb button : no event

So I only get the following buttons :

1 2 3 4 5 9 10

which is 7 out of 12 if I count the redundant codes.

The relevant section of my xorg.conf is :

Section "InputDevice"

# Identifier and driver

# Settings for Logitech MX1000 12 button mouse

    Identifier  "Mouse1"

    Driver      "mouse"

    Option "Protocol"    "evdev"

    Option "DevName"     "ImExPS/2 Logitech Explorer Mouse"

    Option "DevPhys"     "isa0060/serio1/input0"

    Option "Device"      "/dev/input/event0"

    Option "Buttons"     "12"

    Option "ZAxisMapping" "9 10 11 12"

    Option "Resolution" "800"

EndSection

So is there a way to get a distinct event per button ?

And is there a logic behind the order of the button numbers as set with x:modmap ? I haven't quite figured how to create the sequence...

----------

## GlaDiaC

Hi,

the button 6 and 7 is mapped to XF86Back and XF86Forward by default. So the button 6 and 7 should be mapped to the thumb buttons.

Could try someone try these pointers for me to find out which one is the best.

xmodmap -e "pointer = 1 2 3 6 7 11 12 9 10 8 4 5"

xmodmap -e "pointer = 1 2 3 6 7 8 9 10 11 12 4 5"

Thanks,

 -- gladiac

----------

## FFred

I don't notice any functional difference between the two settings actually...

I just tried both and they seem to do pretty much the same thing.

----------

## parasonic

Is there a way to get the side buttons to go backward or forward in Mozilla? I have the mouse mapped out, and the system seems to see everything...but no idea where to go from here. By the way, Enemy Territory sees mouse1-5 and mwheelup and down but no side buttons. (Those show up as kp_ins or something.) Is that an issue with id's programming in the ET binary itself? Thanks.

----------

## koroumel

I have my mouse side buttons working as you request, by using only xmodmap, so there should be no problem with ET, nor Mozilla. Unfortunatelly I'll return home from work in 4 hours  :Crying or Very sad:   but I will post then  :Smile:  .

Only the two forward/backward rocker buttons on top are bitchy.

----------

## altorus

 *MetatronX99 wrote:*   

> http://www.linux-gamers.net/modules/wfsection/article.php?articleid=46
> 
> try that out for size. 
> 
> Cheers.

 

Thankyou thankyou thankyou

I've always been too lazy to get this working but that guide was perfect

For the record. Logitec cordless optical trackmen are the 7 button variety.

----------

## rakig

I have the mx1000, but am having issues with getting all the buttons working. 

xorg.conf (relevant section)

Section "InputDevice"

        Identifier      "Mouse0"

        Driver          "mouse"

        Option          "Protocol" "evdev"

        Option           "Dev Name" "Logitech USB Receiver"

        Option           "Dev Phys" "usb-0000:00:1d.0-1/input0"

        Option           "Device" "/dev/input/mice"

        OPtion          "Buttons" "12"

        Option           "ZAxisMapping"  "11 12"

        Option          "Resolution"   "800"

        Option          "CorePointer"

EndSection

.Xmodmap

pointer = 1 2 3 11 12 6 7 8 9 10 4 5

For some reason, the back button is scroll up, the forward button is scroll down (buttons 4 and 5). my guess is that Xmodmap isn't working. I'm using gnome 2.8, and when i first ran it, it told me it found a Xmodmap, but wont use it. i can't figure out how to enable it. 

any help would be appreciated

----------

## colinb

I followed the instructions here: http://www.linux-gamers.net/modules/wfsection/article.php?articleid=46

and my MX1000 seems to be working ok, but I don't want the horizonal-scrolling events on the wheel to be interpreted as left-button clicks. (I often get both by accident when I'm just trying to press the wheel.)

How can I make the horz-scroll directions not do anything at all?

--Colin

----------

## Heliode

 *bastiaannaber wrote:*   

> I also bought an MX1000 today and I am very pleased with it! I got all 12! buttons working by putting the following in my /etc/X11/XF86Config-4 (I am a debian user)
> 
> ```
> 
> Section "InputDevice"
> ...

 

Hey, 

I'm also trying to get my MX1000 up&running correctly, so I thought i'd use your config. However, when entering the xmod command, it says:

```

xmodmap: unable to open display ':0.0' 

```

Also, when I now try to startx (with the updated xorg.conf) I get a black screen for a few moments and then it drops me back to the console, with the following output:

```

(WW) fglrx: No matching Device section for instance (BusID PCI:1:0:1) found

FATAL: Module fglrx not found

[drm] failed to load kernel module "fglrx"

(EE) fglrx(0): DRIScreenInit failed!

(EE) Mouse1: cannot open input device

No core pointer

```

I've got evdev added to the kernel as module. Do I also need some other module? (fglrx?)  If so, where can I find it in the menuconfig menu? It took me quite a while to find evdev (only to find out it was called "Event interface" in menuconfig...)

Thanks in advance!!

=============

Edit:

 I figured it out; There was an error in my syntax in the xorg.conf file.

However, now that I am in X, I still can't get any events on the other mouse buttons.... the only ones that respond are left, right and scrollwheel-press... the others do not generate anything in xev.

I did state in xorg.conf that the mouse has 12 buttons and I mapped those using xmodmap, but they still produce nothing...  :Sad:  There's nothing physically wrong with the mouse, as it works perfectly under windows.

Edit2: 

Below is my xorg.conf. If anyone could point out any errors I would be extremely grateful!

```

Section "InputDevice"

        Identifier      "Mouse1"

        Driver          "mouse"

        Option          "Protocol"      "evdev"

        Option          "Dev Name"      "ImPS/2 Generic Wheel Mouse" 

        Option          "Dev Phys"      "isa0060/serio1/input0" 

        Option          "Device"        "/dev/input/mice"

        Option          "Buttons"       "12"

        Option          "ZAxisMapping"  "11 12"

        Option          "Resolution"   "800"

        Option          "CorePointer"

```

----------

## koroumel

Heliode, in the begining of your xorg.conf, you tell the system which mouse device to be used (usually mouse0). In this walkthrough, the author used mouse1 (for his own reasons) in the "input device" part, but I believe that you are using another sceme... check to see if everything that refers to the mouse you use has the same identifier.

----------

## Heliode

 *koroumel wrote:*   

> Heliode, in the begining of your xorg.conf, you tell the system which mouse device to be used (usually mouse0). In this walkthrough, the author used mouse1 (for his own reasons) in the "input device" part, but I believe that you are using another sceme... check to see if everything that refers to the mouse you use has the same identifier.

 

Thanks for pointing that out. However, I can't find anything in my xorg.conf that refers to the mouse. Does that mean it points to 'mouse0' by default? Or is there anything in particular to look for? I can't test the mouse right now, because i'm remotely logged in on it (ssh).

Thanks in advance!

----------

## Heliode

I changed its name to Mouse0, and X starts up without any errors... however, it still doesn't generate more than 3 mouse events  :Sad: 

I'm pretty sure my xorg.conf is allright now... any other places I should look??

Thanks!

----------

## koroumel

Can you please define what you mean by "more than 3 mouse events"? Do you mean that no more than 3 buttons have an output in xev, or that you can only press 3 buttons simultaneously and have an output?

----------

## Heliode

 *koroumel wrote:*   

> Can you please define what you mean by "more than 3 mouse events"? Do you mean that no more than 3 buttons have an output in xev, or that you can only press 3 buttons simultaneously and have an output?

 

Only the left-mouse-button, the scrollwheel-press and the right-mouse-button generate events in xev.

I had a friend of mine, who is more experianced in Gentoo, take a look at my system. He couldn't find anything wrong with the mouse configuration. However, he did notice that, in menuconfig, the option for 'Logitech busmouse' was not present. (2.6.9-r4 gentoo sources) 

So we downloaded 2.6.8-r10, which DID have the option in menuconfig. That kernel, however, failed to boot the system... but that might be because we didn't pay alot of attention to the rest of menuconfig.

Now I need advice; any chance I can get the mouse working properly with my current kernel or would it be best for me to get the 2.6.8-r10 kernel up?

Thanks!

----------

## koroumel

I am running 2.6.9-r3 and it works as good as it did with any other kernel I've tried it with. Are you sure you are using xmodmap -e "pointer = 1 2 3 11 12 6 7 8 9 10 4 5" or a similar setting?

----------

## Gwydion77

I have bought the MX1000 and got all buttons working under Linux using the evdev protocol and connecting it via USB. But the mouse sometimes "jumps" to the left screen side. The "jumpy behavior" seems to be a common problem with the MX1000 and it can be solved (actually it's more like a workaround than a solution) by connecting it to the PS/2 port. But now I cannot use all my buttons anymore (of course I did the necessary changes to my xorg.conf). This cannot be a PS/2 hardware limitation, because under Windows all buttons work. Has anyone got an idea how to revive the buttons again?

----------

## Heliode

 *koroumel wrote:*   

> I am running 2.6.9-r3 and it works as good as it did with any other kernel I've tried it with. Are you sure you are using xmodmap -e "pointer = 1 2 3 11 12 6 7 8 9 10 4 5" or a similar setting?

 

The exact thing I typed is:

```
xmodmap -e "pointer = 1 2 3 11 12 6 7 8 9 10 4 5"
```

What mouse input option did you compile into the kernel? Because on my PC it calls it "mPS/2 Generic Wheel Mouse" which is somewhat strange, since my pc doesn't even have any PS/2 ports   :Laughing: 

What name did it get on your box?

----------

## koroumel

I'll tell you late tonight, when I will return home from work. Your mouse is called mPS/2 Generic wheel Mouse in kernel or during X startup?

----------

## Heliode

 *koroumel wrote:*   

> I'll tell you late tonight, when I will return home from work. Your mouse is called mPS/2 Generic wheel Mouse in kernel or during X startup?

 

When I do 

```
#cat /proc/bus/input/devices
```

It calls it that.

----------

## Heliode

Anyone have any idea? I Tried everything I could think of and I really don't know where to go from here  :Sad: 

thanks in advance!

----------

## Alucinor

How can I get xmodmap to execute automatically every time I start up?

And xbindkeys is not recognizing my mouse buttons. I tried xbindkeys -k and then clicking my mouse buttons but nothing showed up (althought keyboard worked). I have my MX1000 on ps/2 port. Mouse is working fine but I would like to bind my buttons :)

Anyone know what might be wrong?

----------

## koroumel

In /etc/X11/xinit, create a file called Xmodmap that has something like "pointer = 1 2 3 6 7 8 11 12 9 10 4 5" as text inside it. Now it will be loaded at startup!

----------

## koroumel

By the way :

xorg.conf

```
Section "ServerLayout"

   Identifier     "XOrg Configured"

   Screen      0  "Screen0" 0 0

   InputDevice    "Logitech MX1000" "CorePointer"

   InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

   RgbPath      "/usr/X11R6/lib/X11/rgb"

   ModulePath   "/usr/X11R6/lib/modules"

   FontPath     "/usr/share/fonts/TTF"

   FontPath     "/usr/share/fonts/misc/"

   FontPath     "/usr/share/fonts/Speedo/"

   FontPath     "/usr/share/fonts/Type1/"

   FontPath     "/usr/share/fonts/CID/"

   FontPath     "/usr/share/fonts/75dpi/"

   FontPath     "/usr/share/fonts/100dpi/"

EndSection

Section "Module"

   Load  "extmod"

#   Load  "dri"

   Load  "dbe"

   Load  "record"

   Load  "xtrap"

   Load  "glx"

#   Load  "speedo"

   Load  "type1"

   Load  "freetype"

EndSection

Section "InputDevice"

   Identifier  "Keyboard0"

   Driver      "kbd"

EndSection

Section "InputDevice"

   Identifier  "Logitech MX1000"

   Driver      "mouse"

   Option       "Protocol" "evdev"

   Option       "Dev Name" "Logitech USB Receiver" #cat /proc/bus/input/devices

   Option       "Dev Phys" "usb-0000:00:10.1-2/input0" #cat /proc/bus/input/devices

   Option       "Device" "/dev/input/mice" # Choose the correct input event here.

   Option        "Buttons"  "12"

   Option       "ZAxisMapping" "11 12"

   Option       "Resolution" "800"

   Option      "CorePointer"

EndSection

```

```
amd64 root # cat /proc/bus/input/devices

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41

N: Name="AT Translated Set 2 keyboard"

P: Phys=isa0060/serio0/input0

H: Handlers=kbd event0

B: EV=120013

B: KEY=402000000 3802078f840d001 f2ffffdfffefffff fffffffffffffffe

B: MSC=10

B: LED=7

I: Bus=0003 Vendor=046d Product=c50e Version=2500

N: Name="Logitech USB Receiver"

P: Phys=usb-0000:00:10.1-2/input0

H: Handlers=kbd mouse0 event1

B: EV=120007

B: KEY=ffff0000 1000000000000 0 0 0

B: REL=103

B: LED=fc00

```

Are you using udev Heliode? Is you usb set up properly in kernel? Check these out as well as my configs and let us know.

----------

## Heliode

I Think I figured it out. I emerged coldplug and, after rebooting, I also got a entry for "Logitech USB Receiver" in my /proc/bus/input/devices . Now all the buttons generate events. 

I've used xbindkeys (as described in this howto) to set the two thumb-buttons for back and forward, and the middle thumb button for 3ddesk. 

However, no matter what I do, I can't get the damned thing to scroll   :Razz:  the wheel generates mouse-events 11 and 12, and those are entered in ZAxisMapping... so I don't understand why it doesn't scroll. Any ideas?

I've learned a lot thanks to this topic! Before any of this, I never realised setting up a mouse could be so complicated. Quite an eye-opener  :Wink:  Thanks so far!

Edit: strangely, when xbindkeys isn't enabled yet, the forward thumb-button scrolls down while the back thumb-button scrolls up   :Shocked: 

My current xorg.conf;

```

Section "InputDevice"

        Identifier      "Mouse[0]"

        Driver          "mouse"

        Option          "Protocol"      "evdev"

        Option          "Dev Name"      "Logitech USB Receiver" #cat /proc/bus/input/devices

        Option          "Dev Phys"      "usb-0000:00:1d.0-1/input0" #cat /proc/bus/input/devices

        Option          "Device"        "/dev/input/mice"

        Option          "Buttons"       "12"

        Option          "ZAxisMapping"  "11 12"

        Option          "Resolution"   "800"

        Option          "CorePointer"

```

----------

## koroumel

If you use xmodmap -e pointer = 1 2 3 6 7 8 11 12 9 10 4 5, you will have scroll wheel and the side buttons will navigate forward/backward in web pages.

----------

## Gwydion77

I think currently it's not possible to get all buttons working when the mouse is connected via PS/2.

But this cannot be a PS/2 limitation, because under Windoze all buttons work properly.

Does anyone know how to get unfiltered "raw" data from the ps/2 port? All devices I have tried (like "cat /dev/input/event0") do not show anything when pressing the middle thumb button or the horizontal scrolling buttons. So I think that these devices only show somehow "filtered" output.

----------

## Heliode

 *koroumel wrote:*   

> If you use xmodmap -e pointer = 1 2 3 6 7 8 11 12 9 10 4 5, you will have scroll wheel and the side buttons will navigate forward/backward in web pages.

 

No such luck... no matter what I do with xmodmap, my mouse behaves exactly the same as it did before. I issue, exactly, the following command;

```

xmodmap -e "pointer = 1 2 3 6 7 8 11 12 9 10 4 5"

```

And I even restart X with ctrl+alt+backspace, but still the two thumb buttons make the page go up and down (funny enough, the forward button makes it go down, while the backward button makes it go up)and the scroll wheel does a strange kind of selecting action.  I've tried a lot of other xmodmap commands but whatever I do, the mouse keeps responding in the same way.

Edit: there is a file in my homedir called ".Xmodmap" with the pointer line in it. I tried manually changing that with a text editor, but it didn't have any effect. Just tought it might be relevant  :Wink: 

If we finially get this working maybe this could be added to the FAQ, seeing how many people have viewed this topic.

 *Gwydion77 wrote:*   

> I think currently it's not possible to get all buttons working when the mouse is connected via PS/2.
> 
> But this cannot be a PS/2 limitation, because under Windoze all buttons work properly.
> 
> Does anyone know how to get unfiltered "raw" data from the ps/2 port? All devices I have tried (like "cat /dev/input/event0") do not show anything when pressing the middle thumb button or the horizontal scrolling buttons. So I think that these devices only show somehow "filtered" output.

 

Do you have evdev in the kernel and coldplug on startup? For me, that managed to give me all the events the mouse can generate. Not sure how that would be for PS/2 though, since my pc doesn't have any PS/2 connection points.

----------

## koroumel

Delete that Xmodmap from your home dir, and from the /etc/X11/xinit/ dir, they could be messing up things for you. Honestly, I can't see what else is going wrong. Since you can see events for every button in xev, you can then program the buttons to you liking by using Xmodmap. You shouldn't restart you X server after you type the Xmodmap string (in case you did so). Could you also try not to use xbindkeys for mouse events... in case this is conflicting with Xmodmap (some would say that what I just typed is totaly wrong.... and they are possibly right)

----------

## Gwydion77

 *Heliode wrote:*   

> Do you have evdev in the kernel and coldplug on startup? For me, that managed to give me all the events the mouse can generate. Not sure how that would be for PS/2 though, since my pc doesn't have any PS/2 connection points.

 

As all buttons are working via USB (I wrote this earlier, and why I have to use PS/2) I think the evdev stuff is all configured correctly. About coldplug i do not know, I wasn't aware that I may need that. Actually I never heard of that before  :Wink: 

What is  necessary to enable coldplug (kernel options, config file)?

----------

## Heliode

 *Gwydion77 wrote:*   

>  *Heliode wrote:*   Do you have evdev in the kernel and coldplug on startup? For me, that managed to give me all the events the mouse can generate. Not sure how that would be for PS/2 though, since my pc doesn't have any PS/2 connection points. 
> 
> As all buttons are working via USB (I wrote this earlier, and why I have to use PS/2) I think the evdev stuff is all configured correctly. About coldplug i do not know, I wasn't aware that I may need that. Actually I never heard of that before 
> 
> What is  necessary to enable coldplug (kernel options, config file)?

 

Well, for me, this worked;

```

emerge coldplug

```

and after that;

```

rc-update add coldplug boot

```

Coldplug is like hotplug, but for devices connected on startup. For instance, mice   :Wink: 

I'll now try what koroumel suggested... i'll edit the results in asap.

Edit:

That worked, thanks! This is great! 

I can't believe how much i've learned from this, thanks a lot!

If its not too much trouble, could you also tell me how to assign the other buttons to functions like application starting and such? Or would I absolutely need Xbindkeys for that?

Thanks again!

Edit #2:

Hmm when I logg out and back in, my key config is back to its old behavior, although I do have a file in '/ect/X11/xinit' called 'Xmodmap' with the propper command in it.

----------

## koroumel

Strange, if itr is in xinit, it should get loaded, maybe the system is not checking for the config file there... I really don't have a chance checking it now... as usual I'm at work stuck with a win2k desktop system.

----------

## karr

I should point out that I am using an mx310, but this thread still helped me get all 8 buttons working. I noticed something interesting about the "Dev Phys" option. It seems that with the mx310 it is unneeded, and causes the mouse, and Xorg to not work if the mouse is plugged into a different USB slot than the one used for "cat /proc/bus/input/devices", since each usb slot has different value for this.

Like I said, I don't know if it hold true that you dont need  Option "Dev Phys" with the mx1000, but I thought I would point it out, in case it does.

----------

## satanskin

I have a MX1000 and so far I've the scroll wheel to use page up and down, and the front button on the side to do close (alt+f4 in gnome). I have the back button on the side set as minimize (alt+f9 in gnome), but it isn't working for some reason. Below is a copy of the .xbindkeysrc. I even tried adding the -xsendevent to it also for the minimize with no luck though. Any idea how to make it minimize the window? Also, any ideas on getting the scroll to be a smaller and smoother scroll, i.e. 3-5 lines rather than a page at a time? Thanks.

# the up and down by the wheel pages up and down

"xvkbd -xsendevent -text "\[Page_Up]""

m:0x10 + b:11

"xvkbd -xsendevent -text "\[Page_Down]""

m:0x10 + b:12

#Close window

"xvkbd -text "\[Alt_L]\[F4]""

m:0x10 + b:5

#Minimize window

"xvkdb  -text "\[Alt_L]\[F9]""

m:0x10 + b:4

----------

## floam

If you havn't switched yet, I'd highly reccomend everyone switch to one of the Xorg 6.8.99 snapshots that are in portage. They have official evdev support in them thats much easier to use and automatically maps the buttons to work properly everywhere.

I put together a little guide/information dump on getting it to work this way, if anyones interested:

http://floam.sh.nu/guides/mx1000

----------

## H-Dragon

great idea, floam... but i am using a ati radeon 9600xt with ati-drivers.

how do i get around that and ati-drivers incompatibility with the new xorgs????

----------

## xante

Well I have all the buttons recognized using this xorg.conf:

x11-base/xorg-x11

      Latest version available: 7.0

      Latest version installed: 6.8.2-r6

```
Section "InputDevice"

        Identifier  "Mouse0"

        Driver      "mouse"

        Option      "Protocol" "evdev"

        Option      "Device" "/dev/input/event0"

        Option      "Buttons" "12       "

        Option      "ZAxisMapping" "4 5"

        Option      "Dev Phys" "usb-*/input0"

EndSection

```

```
xante # cat .xinitrc | grep xmo

xmodmap -e "pointer = 1 2 3 6 7 8 9 10 11 12 4 5"

```

This is where I become a little frosty on what to do, I have never heard of xvkbd and xbindkeys, I knew it was possible and I had only really heard about fluxbox's implementation of it. Let me know if i have to do anything more than this to set xvkbd and xbindkeys:

```
xante # cat .xbindkeysrc 

"xvkbd -xsendevent -text "\[Alt_L]\[Left]""

  m:0x10 + b:11

"xvkbd -xsendevent -text "\[Alt_L]\[Right]""

  m:0x10 + b:12

```

And that is my xwindows startup, yet my mouse refuses horizantal scrolling. Any explanations?

----------

## xante

Oh, I see where my mistake is, Alt_L Left causes mozilla firefox to go back a page, just change that to a quick Left only and you have your horiz scrolling  for the majority of programs anyways.  Just thinking about this after using it for a couple days, is there any better way, that would allow all programs to recognize horizantal scrolling or could you set specific movments per application, Like:

When left horizantal scroll is operated in firefox it sends a "Left" from the keyboard.

And say if your using gimp, it would scroll in or out which is "ctrl up/down" If i remember correctly.

These are just examples.

----------

## xante

Not so lucky I guess, couple of days playing around and Ive come to the conclusion, I still need the forums support. With the configuration above  I have discovered that a single click left or right will do the trick, but when I hold down the left/right direction the first movement will be left/right but after holding it it will move up and down again, any solutions?

----------

## XenoTerraCide

my first thing is me and evdev aren't getting along... and I probably won't change to a higher version of X 'till it get's stable. I have scroll working. and I don't care about horizontal scroll. the forward and back thumb button's seemed to be mapped to the same event's as 1 and 2. don't know why. they are the only thing I care about working. I see some people have like 4 button's in there zaxis and others have 2 in there xorg.conf. I've also tried several different configurations of xmodmap... none of it works. I'm pretty sure I can get these button's working as they merely just seem to be mapped wrong... maybe I should say it's a 12 button? because it won't detect the horizontal scroll? I've no idea.... I can post those the relevant section's if needed however. It won't say much. oh I have the bluetooth mx1000 I got the desktop set.

----------

## XenoTerraCide

oh and floam... your site is laggy... you need to redesign it take the fancy stuff your trying to do out. I don't mean to be insulting. It's pretty bad here.

----------

