# Problem configuring Intellimouse Explorer buttons

## ejlemay

Hello all, I am new to Gentoo and this is my first post so yoroshiku.

I just installed Gentoo + KDE and so far, everything works pretty well. One thing that doesn't work though is the Intellimouse Explorer (connected using PS/2). After reading several posts and web pages, I was able to use it but for some reason, the wheel and the side buttons got swapped. In other words, the wheel allows me to navigate back and forth when browsing the web, and the side buttons scroll up and down a page. Very annoying because I keep forgetting.

I'm sure it's just a simple configuration setting somewhere...

Any help would be appreciated.

Eric

----------

## solomonHk

Ok,  I really need to see you conf file for xorg/xfree   whatever you are running.   But without looking,  do you have Option ZAxisMapping "4 5" and maybe Option Button "5".   These settings take alot of experimenting.  I would almost suggest editing your x.conf back to where it loads the standard x interface, tweak your conf,  see what it does with your mouse, then restart x to reset.  Its just a matter of finding out how the mouse is mapped.

----------

## ejlemay

OK, I tried once more playing with the various configuration settings I could find, but to no avail. Here are the relevant sections of various configuration files.

First, from xorg.conf:

```
    Identifier   "Mouse1"

    Driver   "mouse"

    Option      "Protocol"     "ExplorerPS/2"

    Option      "Device"       "/dev/mouse"

    Option      "Buttons"      "7"

    Option      "ZAxisMapping" "6 7"
```

I also tried changing the Protocol to IMPS/2, but that did not seem to help. Not sure which one I am supposed to use, I have an Optical Intellimouse Explorer that is connected using the PS/2 port using the little adapter thing that came with it.

Then, I created a file called .Xmodmap, also located in /etc/X11. It just contains two lines:

```
pointer - 1 2 3 6 7 4 5

imwheel -p -k -b "67"
```

Finally, there is the imwheelrc file, located in /etc/X11/imwheel. I don't remember exactly what changes I made to this file, so here it is (all of it):

```
# IMWheel Configuration file ($HOME/.imwheelrc or /etc/imwheelrc)

# (GPL)Jon Atkins <jcatki@jonatkins.org>

# Please read the README and/or imwheel(1) manpage for info

# and this is best operated on using vim (as I said: It's crunchy)

#

# This is only for demonstration of the priority command...

# See the other global Exclude command below for the one you want to use!

# If this is activated it will only apps that have a lower priority

# priority is based first on the priority command, then the position in this

# file - the higher the line is in a file the higher in a priority class it is

# thus for a default priority you can see that the position in the file is

# important, but the priority command CAN appear anywahere in a window's list

# of translations, and the priority will be assigned to all translations below

# it until either a new window is defined or the priority is set again.

#

#".*"

#@Priority=-1000 #the default priority is zero, higher numbers take precedence

#@Exclude

#@Repeat

# want it to type something?

# this would type "Rofl" and press Return in any window

#".*"

#,Up,Shift_L|R|-R|-Shift_L|O|-O|F|-F|L|-L|Return

# This one rule can send button events, as if you used ZAxisMapping "4 5"

# Make sure your XF86Config allows for the max buttons needed...

# otherwise the events will NOT even be generated...

#".*"

#, Up, Button4

#, Down, Button5

#, Left, Button6

#, Right, Button7

#, Thumb1, Button6

#, Thumb2, Button7

# alternatively with Button numbers

#".*"

#, Button4, Button4

#, Button5, Button5

#, Button6, Button6

#, Button7, Button7

#, Button6, Button6

#, Button7, Button7

#Thanks to Mathias Weyland <mathias@weyland-wtal.de>

"^mutt.*"

None,           Up,     Up

None,           Down,   Down

Control_L,      Up,     Page_Up

Control_L,      Down,   Page_Down

#Thanks to Mathias Weyland <mathias@weyland-wtal.de>

"^aterm"

None,           Up,     Shift_L|Page_Up

None,           Down,   Shift_L|Page_Down

Control_L,      Up,     Up

Control_L,      Down,   Down

#Thanks to Mathias Weyland <mathias@weyland-wtal.de>

"^Xplns"

None,           Up,     Left

None,           Down,   Right

Control_L,      Up,     Up

Control_L,      Down,   Down

"^kvt"

None,      Up,      Shift_L|Page_Up

None,      Down,   Shift_L|Page_Down

"^Konsole"

None,      Up,      Shift_L|Page_Up

None,      Down,   Shift_L|Page_Down

"^XMcd"

None,      Up,      C

None,      Down,   Shift_L|C

"^XMMS_Player"

Shift_L,      Up,      Right

Shift_L,      Down,   Left

"^XMMS_Playlist"

Shift_L,   Up,      Page_Up

Shift_L,   Down,   Page_Down

"^xmms"

Alt_L,      Up,      Z

Alt_L,      Down,   B

Control_L,   Up,      V

Control_L,   Down,   C

"^XATITV-GATOS"

None,       Down,   KP_Subtract

None,       Up,      KP_Add

"^Xman"

None,      Down,   F

Shift_L,   Down,   3

None,      Up,      B

"^Gvi(m|ew)"

Alt_L,   Up,      Page_Up

Alt_L,   Down,   Page_Down

Shift_L,   Up,      Control_L|Y

Shift_L,   Down,   Control_L|E

#None,      Up,      Page_Up

#None,      Down,   Page_Down

#,   Up,   Button4

#,   Down,   Button5

,   Left,   Shift_L|Left

,   Right,   Shift_L|Right

,   Thumb1,   Shift_L|Left

,   Thumb2,   Shift_L|Right

"^VIM"

Shift_L,   Up,      Control_L|Y

Shift_L,   Down,   Control_L|E

#None,      Up,      Page_Up

#None,      Down,   Page_Down

"^Eterm"

Alt_L,      Up,      Up

Alt_L,      Down,   Down

#Alt_L,      Up,     Shift_L|Page_Up

#Alt_L,      Down,   Shift_L|Page_Down

#"^GnomeTerminal"

#@Exclude

#@Repeat

#None,      Up,      Shift_L|Page_Up

#None,      Down,   Shift_L|Page_Down

"^NXTerm"

None,      Up,     Shift_L|Page_Up

None,      Down,   Shift_L|Page_Down

"^rxvt"

Alt_L,     Up,      Shift_L|Page_Up

Alt_L,     Down,   Shift_L|Page_Down

"^XTerm"

Alt_L,      Up,      Shift_R|Page_Up

Alt_L,      Down,   Shift_R|Page_Down

Alt_L,      Left,   Control_L|A

Alt_L,      Right,   Control_L|E

#Shift_L,   Down,   Shift_L|1

"^VMware"

@Exclude

#@Repeat

"^Mozilla-bin$"

#,   Up,   Button4

#,   Down,   Button5

#,   Left,   Alt_L|Left

#,   Right,   Alt_L|Right

#

# If you want to scroll by a few lines then uncomment these 4 lines

# and comment out the paging 4 lines below these!

#

Shift_L,   Down,   Page_Down,         1#,   1000,   1000

Shift_L,   Up,      Page_Up,         1#,   1000,   1000

#None,      Down,   Down,            7#,   1000,   1000

#None,      Up,      Up,               7#,   1000,   1000

#

# If you don't like page scrolling then comment these out and uncomment above!

#

#Shift_L,   Down,   Down,            7,

#Shift_L,   Up,      Up,               7,

#None,      Down,   Page_Down,         1,

#None,      Up,      Page_Up,         1,

# Left/Right & Thumb stuff

None,      Left,   Left,            7,

None,      Right,   Right,            7,

None,      Thumb1,   Down,            7,

Shift_L,   Thumb1,   Up,               7,

None,      Thumb2,   Up,               7,

Shift_L,   Thumb2,   Down,            7,

"^Freespace.*"

,   Up,      Y

,   Down,   X

,   Thumb1,   H

,   Thumb2,   R

"^SDL_App"

#,   Up,      Button4

#,   Down,   Button5

,   Thumb1,   Home   #many apps don't understand Button > 5

,   Thumb2, End      #many apps don't understand Button > 5

# Thanks to shewp <shewplx@pblx.net>

"^Opera" 

#@Repeat    # let qt do it

None,       Down,   Down,               4,  100,    100

None,       Up,     Up,                 4,  100,    100

None,       Thumb1, Right

None,       Thumb2, Left

"^Netscape.*"

, Thumb1, Alt_L|KP_Left

, Thumb2, Alt_L|KP_Right

#, Up, Button4

#, Down, Button5

"^Netscape"

#

# If you don't want to scroll by a few lines then comment out these 4 lines

# and uncomment the paging 4 lines below these!

#

Shift_L,   Down,   Page_Down,         1,   1000,   1000

Shift_L,   Up,      Page_Up,         1,   1000,   1000

None,      Down,   Down,            7,   1000,   1000

None,      Up,      Up,               7,   1000,   1000

#

# If you don't like page scrolling then uncomment these

# and comment out the 4 lines above!

#

#Shift_L,   Down,   Shift_L|Down,      7,   1000,   1000

#Shift_L,   Up,      Shift_L|Up,         7,   1000,   1000

#None,      Down,   Page_Down,         1,   1000,   1000

#None,      Up,      Page_Up,         1,   1000,   1000

# Left/Right & Thumb stuff

None,      Left,   Left,            7,   1000,   1000

None,      Right,   Right,            7,   1000,   1000

None,      Thumb1,   Down,            7,   1000,   1000

Shift_L,   Thumb1,   Up,               7,   1000,   1000

None,      Thumb2,   Up,               7,   1000,   1000

Shift_L,   Thumb2,   Down,            7,   1000,   1000

"^Navigator"

#Alt_L,      Down,   Alt_L|Right

#Alt_L,      Up,      Alt_L|Left

Alt_L,      Down,   Right,            10,   1000,   1000

Alt_L,      Up,      Left,            10,   1000,   1000

# Thanks to Paul J Collins <sneakums@usa.net>

"^emacs"

Shift_L,   Up,      Page_Up

Shift_L,   Down,   Page_Down

# you may need Alt instead of Meta....

None,      Down,   Control_L|Meta_L|Shift_L|parenright

None,      Up,      Control_L|Meta_L|Shift_L|parenleft

# Thanks to etienne grossmann <etienne@isr.ist.utl.pt>

"^Xftp"

,         Down,   j

,         Up,      k

".* - Pan$"

,   Left,   Control_L|Button1

,   Thumb1,   Control_L|Button1

#,   Up,   Button4

#,   Down,   Button5

# Thanks to etienne grossmann <etienne@isr.ist.utl.pt>

"^gv[ :]"

None,      Up,      Shift_L|space

None,      Down,   space

#"^Event Tester"

#@Repeat

#@Exclude

#,   Left,   Button6

#,   Right,   Button7

#,   Thumb1,   Button8

#,   Thumb2,   Button9

"^xv grab"

@Priority=1

@Exclude

"^XV.*"

None,   Down,   Tab

None,   Up,      Delete

"^Untitled"

# if using wheel fifo, you may switch these.

#,   Up,      Button4

#,   Down,   Button5

#with these

,   Up,      Page_Up

,   Down,   Page_Down

# (end of switch)

,   Thumb1, Home

,   Thumb2, End

"^No Title"

# if using wheel fifo, you may switch these.

#,   Up,      Button4

#,   Down,   Button5

#with these

,   Up,      Page_Up

,   Down,   Page_Down

# (end of switch)

,   Left, Home

,   Right, End

,   Thumb1, Home

,   Thumb2, End

#"\(null\)"

# if using wheel fifo, you may want the 2nd group

#,   Up,      Button4

#,   Down,   Button5

#,   Left, Button6

#,   Right, Button7

#,   Thumb1, Button8

#,   Thumb2, Button9

# 2nd group (old keys...)

#,   Up,      Page_Up

#,   Down,   Page_Down

#,   Left, Home

#,   Right, End

#,   Thumb1, Home

#,   Thumb2, End

# (end of switch)

# send event to the window manager when in the root window...

"\(root\)"

,   Up,      Control_L|N

,   Down,   Control_L|P

,   Thumb1,   Alt_L|Left

,   Thumb2,   Alt_L|Right

#

# Uncommment the following to exclude by default.

# Then you will have to add new apps all the time, but will retain any built-in

# wheel functionality contained in some KDE and other newer programs.

# This kinda defeats the original purpose of the program! ;)

#

#".*"

#@Priority=-1000

#@Exclude

#@Repeat

#

# These are the defaults, but note that the defaults for the right side of the

# keyboard are still handled within the program, unless you add the

# combinations desired here. (except for the None modifier of course!)

# If this section is deleted then the hardcoded defaults will be used, which

# are the same thing.

# Modifying these has global effects, but doesn't override what is above.

#

".*"

#@Priority=-1001

None,   Up,   Alt_L|Left

None,   Down,   Alt_L|Right

#None,                     Left,   Left

#None,                     Right,   Right

#None,                     Up,      Page_Up

#None,                     Down,   Page_Down

#Shift_L,                  Left,   Left

#Shift_L,                  Right,   Right

#Shift_L,                  Up,      Up

#Shift_L,                  Down,   Down

#        Control_L,            Left,   Left,      2

#        Control_L,            Right,   Right,      2

#        Control_L,            Up,      Page_Up,   2

#        Control_L,            Down,   Page_Down,   2

#Shift_L|Control_L,            Left,   Left,      5

#Shift_L|Control_L,            Right,   Right,      5

#Shift_L|Control_L,            Up,      Page_Up,   5

#Shift_L|Control_L,            Down,   Page_Down,   5

#                  Alt_L,      Left,   Left,      10

#                  Alt_L,      Right,   Right,      10

#                  Alt_L,      Up,      Left,      10

#                  Alt_L,      Down,   Right,      10

#Shift_L|          Alt_L,      Left,   Left

#Shift_L|          Alt_L,      Right,   Right

#Shift_L|          Alt_L,      Up,      Left

#Shift_L|          Alt_L,      Down,   Right

#        Control_L|Alt_L,      Left,   Left.      20

#        Control_L|Alt_L,      Right,   Right.      20

#        Control_L|Alt_L,      Up,      Left.      20

#        Control_L|Alt_L,      Down,   Right.      20

#Shift_L|Control_L|Alt_L,      Left,   Left,      50

#Shift_L|Control_L|Alt_L,      Right,   Right,      50

#Shift_L|Control_L|Alt_L,      Up,      Left,      50

#Shift_L|Control_L|Alt_L,      Down,   Right,      50

#,   Thumb1, Home

#,   Thumb2, End

# vim:ts=4:shiftwidth=4:syntax=sh
```

One last thing: some of the information I've read talks about using xev to test for events, however that doesn't seem to do anything on my system. My mouse is definitely working though! If I could just swap those buttons and that wheel...

- Eric

----------

## XenoTerraCide

I can help you I just have to find the documentation I had the same prob and this Documentation will work for any multibutton mouse.

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

hope this tells you what you need to know.

----------

## jonnevers

search, there are numerous.... (to say the least) posts on configuring the extra buttons on a mouse. search for 'intellimous explorer'... then pick one and follow it's directions.

----------

## ejlemay

I finally got my mouse to work. I had already searched and found lots of posts/web pages, some of which contained conflicting information which confused me at first. The problem turned out to be that I simply wasn't calling xmodmap (even tough I thought I was).

Everything OK now, scrolling smoothly. Thanks everybody!

- Eric

----------

## eyexer0

hey what config did you use to get your mouse binds to work for scroll up/scroll down and back and forword buttons on your microsoft mouse mine are backwords.. can I get your config please?

----------

## XenoTerraCide

follow my link.

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

you need to create your .Xmodmap file to get that part of the mapping right, it will fix them from being reversed, this article covers all of it. why post mine when you can use theirs.

----------

## eyexer0

ok I fallow that guide and I have the back botton and the scroll up and down bottons working right now but the forword button does not work.

----------

## XenoTerraCide

How many buttons does your mouse have?

----------

## eyexer0

input: USB HID v1.10 Mouse [Microsoft Microsoft 5-Button Mouse with IntelliEye(TM)] on usb-0000:00:1d.0-1

```
xorg.conf mouse section:

Section "InputDevice"

        Driver      "mouse"

        Identifier  "Mouse0"

        Option      "InputFashion" "Mouse"

        Option      "Name" "Logitech Mouseman Dual Optical"

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

        Option      "Protocol" "ExplorerPS/2"

        Option      "Buttons" "7"

        Option      "ZAxisMapping" "6 7"

EndSection
```

```
.xbindkeysrc

keystate_capslock = enable

#keystate_scrolllock= enable

# Examples of commands:

"xbindkeys_show"

  control+shift + q

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

  m:0x10 + b:9

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

  m:0x10 + b:10

# set directly keycode (here control + f with my keyboard)

"xterm"

  c:41 + m:0x4

# specify a mouse button

"xterm"

  control + b:2

#"xterm -geom 50x20+20+20"

#   Shift+Mod2+alt + s

#

## set directly keycode (here control+alt+mod2 + f with my keyboard)

#"xterm"

#  alt + c:0x29 + m:4 + mod2

#

## Control+Shift+a  release event starts rxvt

#"rxvt"

#  release+control+shift + a

#

## Control + mouse button 2 release event starts rxvt

#"rxvt"

#  Control + b:2 + Release

##################################

# End of xbindkeys configuration #

##################################

```

my buttons are still reversed.

----------

## XenoTerraCide

in your $HOME you should have a file now (it's not there by default) called .Xmodmap it should contain this line.

```
pointer = 1 2 3 6 7 4 5
```

I have never messed with the .xbindkeysrc infact I don't even have one. I'll look at the code in that for you. but my guess is the xmodmap.

----------

## eyexer0

that fixed it thank you.

----------

## XenoTerraCide

not a prob.

----------

