Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

X/Mouse Extra Buttons HOWTO

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
171 posts
  • Page 6 of 7
    • Jump to page:
  • Previous
  • 1
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • Next
Author
Message
R.D.Olivaw
n00b
n00b
Posts: 34
Joined: Thu Nov 11, 2004 3:21 pm
Location: Geneva, Switzerland

  • Quote

Post by R.D.Olivaw » Thu Jan 06, 2005 10:09 pm

Hello all,

I have an optical mouse with 9 buttons. I followed the instruction (or at least tried to :) ) but still have the following probs.

left/right wheel does not work

side buttons produce a arrow left/arrow right effect in firefox as opposed to the desired alt+arrow

Code: Select all

.imwheelrc

".*"
 None, Thumb1, Alt_L|Left
 None, Thumb2, Alt_L|Right

xorg.conf

    Identifier  "Mouse1"
    Driver      "mouse"
    Option "Protocol"    "ExplorerPS/2"
    Option "Device"      "/dev/mouse"
    Option "Buttons" "9"
    Option "ZAxisMapping" "6 7 8 9"

Any insights would be highly appreciated :)
Top
-=LeXuS=-
n00b
n00b
Posts: 56
Joined: Tue Nov 04, 2003 4:38 pm

  • Quote

Post by -=LeXuS=- » Tue Jan 11, 2005 2:31 pm

Hi,
nice topic. But ive got a problem. My mouse is a 7button MS Explorer. I think the 9 button method will do the job for me better than the 7 one (sometimes ive attaching another mouse).

Here are my Xorg.conf snippet:

Code: Select all

Section "InputDevice"
        Identifier      "USBMouse"
        Driver          "mouse"
        Option          "Protocol"      "ExplorerPS/2"
        Option          "Device"        "/dev/input/mice"
        Option          "ZAxisMapping"  "6 7 8 9"
        Option          "Buttons"       "9"
        Option          "Emulate3Buttons"       "off"
EndSection
This is the output from xorg (which does what i tell above):

Code: Select all

(**) Option "Device" "/dev/input/mice"
(**) Option "Buttons" "9"
(**) Option "Emulate3Buttons" "off"
(**) Option "ZAxisMapping" "6 7 8 9"
(**) USBMouse: ZAxisMapping: buttons 6, 7, 8 and 9
(**) USBMouse: Buttons: 9
(**) USBMouse: SmartScroll: 1
But xmodmap says i only have 7 button!!!

Code: Select all

foo@foo$ xmodmap -pp
There are 7 pointer buttons defined.
    Physical        Button
     Button          Code
        1              1
        2              2
        3              3
        4              4
        5              5
        6              6
        7              7
Any ideas??

Bye Dan
Top
Headrush
Watchman
Watchman
User avatar
Posts: 5597
Joined: Thu Nov 06, 2003 12:48 am
Location: Bizarro World

  • Quote

Post by Headrush » Thu Jan 27, 2005 7:04 pm

My guess is the ExplorerPS/2 driver doesn't support that many buttons.

I use the evdev driver and can use all 10 buttons on my MX700.
Top
Sheepdogj15
Guru
Guru
User avatar
Posts: 430
Joined: Fri Jan 07, 2005 9:02 am
Location: Backyard
Contact:
Contact Sheepdogj15
Website

  • Quote

Post by Sheepdogj15 » Mon Jan 31, 2005 8:21 pm

It should be noted that the setup for mutlibutton mouse has to be done differently in AMD64. this is because xmodmap on AMD64 for some reason makes it so your system no longer sees the extra buttons (this may have changed in recent updates of Xorg... it was a while since i had to mess with this).

at the time i already had a partition set up for a 32bit Gentoo environment. so what i did was instead of using the native 64bit xmodmap, i used the one on the other Gentoo partition. i.e.,

Code: Select all

mnt/g32/usr/X11R6/bin/xmodmap -e "pointer = 1 2 3 6 7 4 5"
of course, "g32" is the name of the mount point where the 32 bit Gentoo env can be found... substitute as appropriate for your system. if you have the 32bit compatibility setup on your system, this should work without problem. you can test it by opening the Terminal in X and running "xev"

Code: Select all

xev
this allows you to see what the system "sees" every time you type or use your mouse.

if you want to stick to the default functionality for your mouse, you do not need imwheel. however, i prefer a customized setup where the extra buttons are set to "copy" and "paste", and this setup is the same regardless of the app i'm using. instead, i use xbindkeys and xvkbd.

unfortunately, imwheel, xbindkeys, and xvkbd are all masked in portage from AMD64. so i chrooted into my 32bit env and emerged xbindkeys and xvkbd there (i'm sure there is a viable way to do that locally in AMD64, but i'd just prefer to keep my local env from getting cluttered with crap as much as possible). then after you exit the chroot, you can start xbindkeys like so:

Code: Select all

mnt/g32/usr/bin/xbindkeys
but note that it won't do you any good unless you have a file in your home folder called ".xbindkeysrc".

Note that to have this all up and running every time you startx, make your .xinitrc look like this:

Code: Select all

mnt/g32/usr/X11R6/bin/xmodmap -e "pointer = 1 2 3 6 7 4 5" &
mnt/g32/usr/bin/xbindkeys &
exec startkde
if you are left handed like me ;) change pointer to "pointer = 3 2 1 6 7 4 5"

[note: of course if you don't use KDE, switch "startkde" with whatever's appropriate for your windows manager.]

Like i said, .xbindkeysrc has to be set up so we can switch out various buttons for functions. xbindkeys will use xvkbd for this purpose, but note that xvkbd will probably not work "out of the box." to get it to work, you need to copy a library over from the 32bit install over to the 64bit install.

Code: Select all

cp mnt/g32/usr/lib/libXaw3d.so.8 /usr/lib/libXaw3d.so.8
though, you should probably make sure you won't end up overwriting a copy of the same file, as it might be needed by something else could even be different under the AMD64 env. if this file already exists, try running xvkbd from the terminal:

Code: Select all

/mnt/g32/usr/X11R6/bin/xvkbd
if this returns with an error, then this won't work. unfortunately, i had nothing but bad luck with imwheel in AMD64, but you might be able to get that to work instead.

otherwise, if you enter the above and you get an interface for keyboard input (this is afterall, a virtual keboard daemon), then xvkbd works.

In order to reprogram the extra buttons using this setup, we need to add a few lines to .xbindkeysrc. this is what mine looks like:

Code: Select all

"/mnt/g32/usr/X11R6/bin/xvkbd -xsendevent -text "\Cx""
  m:0x10 + b:2
"/mnt/g32/usr/X11R6/bin/xvkbd -xsendevent -text "\Cc""
  m:0x10 + b:6
"/mnt/g32/usr/X11R6/bin/xvkbd -xsendevent -text "\Cv""
  m:0x10 + b:7
by all means, change this setup to suit your purposes. consult the man pages for xvkbd and xbindkeys for how to use the syntax. note that b:6 and b:7 are the extra buttons, and b:2 is the wheel click button (i never used it for anything else anyways).

that should work. test it out, and hammer out any bugs along the way.
Top
CyberCobra5
n00b
n00b
User avatar
Posts: 30
Joined: Mon Nov 24, 2003 12:25 am

  • Quote

Post by CyberCobra5 » Thu Jul 07, 2005 12:16 am

I followed the howto, but it's not working for some reason.
My left + right buttons work normally, but the forward thumb button now scrolls down, and the back thumb button scrolls up.
Also, the scroll wheel and up/down scroll buttons don't work.
However, the scrollwheel on my Logitech Cordless keyboard does work.
Interestingly, when I run imwheel manually w/ no opts from an xterm, the thumb buttons work properly, but the scrollwheel + scrollbuttons still don't work.
My display manager is GDM.

My settings:

.xinitrc:

Code: Select all

xmodmap -e "pointer = 1 2 3 6 7 4 5"
imwheel -p -f -k -b "67"
exec gnome-session
.imwheelrc

Code: Select all

"(null)"
None, Up,   Alt_L|Left
None, Down, Alt_L|Right

".*"
None, Up,   Alt_L|Left
None, Down, Alt_L|Right
xorg.conf

Code: Select all

Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option		"Protocol"     "ExplorerPS/2"
    Option		"Buttons"      "7"
    Option		"ZAxisMapping" "6 7"
    Option		"Device"		 "/dev/mouse"
EndSection
Top
Sheepdogj15
Guru
Guru
User avatar
Posts: 430
Joined: Fri Jan 07, 2005 9:02 am
Location: Backyard
Contact:
Contact Sheepdogj15
Website

  • Quote

Post by Sheepdogj15 » Thu Jul 07, 2005 1:05 am

run xev in the console in X... a little box will come up. when you do stuff with the mouse over that box, it reports back what mouse events.

does it say anything when you click the misbehaving buttons?
Sheepdog
Why Risk It? | Samba Howto
Top
Headrush
Watchman
Watchman
User avatar
Posts: 5597
Joined: Thu Nov 06, 2003 12:48 am
Location: Bizarro World

  • Quote

Post by Headrush » Thu Jul 07, 2005 1:21 am

Sheepdogj15 wrote:It should be noted that the setup for mutlibutton mouse has to be done differently in AMD64. this is because xmodmap on AMD64 for some reason makes it so your system no longer sees the extra buttons (this may have changed in recent updates of Xorg... it was a while since i had to mess with this).
I think maybe you have a problem with your setup.

I'm on AMD64 and xmodmap works just fine. What version of xorg-x11 are you running?
Top
Sheepdogj15
Guru
Guru
User avatar
Posts: 430
Joined: Fri Jan 07, 2005 9:02 am
Location: Backyard
Contact:
Contact Sheepdogj15
Website

  • Quote

Post by Sheepdogj15 » Thu Jul 07, 2005 1:22 am

oh i got it fixed ages ago, dude. i don't remember what i did differently, though (maybe just upgraded xorg?)
Sheepdog
Why Risk It? | Samba Howto
Top
CyberCobra5
n00b
n00b
User avatar
Posts: 30
Joined: Mon Nov 24, 2003 12:25 am

  • Quote

Post by CyberCobra5 » Thu Jul 07, 2005 1:54 am

Okay, I ran xev, and under my setup, the button-symbol correspondence came out like this:
left - 1
right - 3
(scroll) up -6
(scroll) down - 7
thumb forward - 5
thumb back - 4

Any ideas?
Top
Sheepdogj15
Guru
Guru
User avatar
Posts: 430
Joined: Fri Jan 07, 2005 9:02 am
Location: Backyard
Contact:
Contact Sheepdogj15
Website

  • Quote

Post by Sheepdogj15 » Thu Jul 07, 2005 2:07 am

hmmm... it looks like you aren't getting your xmodmap settings.

try running xmodmap while in X/gnome: xmodmap -e "pointer = 1 2 3 6 7 4 5"
Sheepdog
Why Risk It? | Samba Howto
Top
CyberCobra5
n00b
n00b
User avatar
Posts: 30
Joined: Mon Nov 24, 2003 12:25 am

  • Quote

Post by CyberCobra5 » Thu Jul 07, 2005 2:20 am

running xmodmap from gnome makes it work.
but if i run imwheel in gnome after the xmodmap command, the scrollwheel starts acting as back/forward buttons.
Is there some place I should move the xmodmap command to?
And do I need to modify my .imwheelrc?
Top
Sheepdogj15
Guru
Guru
User avatar
Posts: 430
Joined: Fri Jan 07, 2005 9:02 am
Location: Backyard
Contact:
Contact Sheepdogj15
Website

  • Quote

Post by Sheepdogj15 » Thu Jul 07, 2005 2:38 am

actually, yeah. your .imwheelrc is set up so your scroll wheel (up and down). if i remember right, it should be "left and right" ... that is,

Code: Select all

"(null)"
None, Left,   Alt_L|Left
None, Right, Alt_L|Right

".*"
None, Left,   Alt_L|Left
None, Right, Alt_L|Right 
this is because some mice had thumbsticks or something like that, where up and down were like scroll wheels and you could move it left and right.


actually, try that before you change your .xinitrc
Sheepdog
Why Risk It? | Samba Howto
Top
CyberCobra5
n00b
n00b
User avatar
Posts: 30
Joined: Mon Nov 24, 2003 12:25 am

  • Quote

Post by CyberCobra5 » Thu Jul 07, 2005 3:51 am

nope, didn't work.
scroll wheel still non-functional and thumb buttons are acting as scroll buttons
Top
Sheepdogj15
Guru
Guru
User avatar
Posts: 430
Joined: Fri Jan 07, 2005 9:02 am
Location: Backyard
Contact:
Contact Sheepdogj15
Website

  • Quote

Post by Sheepdogj15 » Thu Jul 07, 2005 3:55 am

ok, new question: are you using a graphical logon, eg. xdm? because i could have sworn you could put that stuff in your.xinitrc, but i run kdm and as a result .xinitrc is ignored.
Sheepdog
Why Risk It? | Samba Howto
Top
CyberCobra5
n00b
n00b
User avatar
Posts: 30
Joined: Mon Nov 24, 2003 12:25 am

  • Quote

Post by CyberCobra5 » Thu Jul 07, 2005 5:08 am

As I said earlier, I use GDM, the Gnome display manager.
UPDATE: I might have hit paydirt. looking over GDM's Xsession file, it uses the file ~/.Xmodmap to change Xmodmap settings. I should be able to use gnome's session feature to start imwheel. I'll report back shortly.
Top
Sheepdogj15
Guru
Guru
User avatar
Posts: 430
Joined: Fri Jan 07, 2005 9:02 am
Location: Backyard
Contact:
Contact Sheepdogj15
Website

  • Quote

Post by Sheepdogj15 » Thu Jul 07, 2005 5:37 am

CyberCobra5 wrote:As I said earlier, I use GDM, the Gnome display manager.
sorry, lousy memory at times. yeah, i think that's the problem.
UPDATE: I might have hit paydirt. looking over GDM's Xsession file, it uses the file ~/.Xmodmap to change Xmodmap settings. I should be able to use gnome's session feature to start imwheel. I'll report back shortly.
cool. i was going to say that i didn't know how Gnome handles that stuff but figured it does
Sheepdog
Why Risk It? | Samba Howto
Top
CyberCobra5
n00b
n00b
User avatar
Posts: 30
Joined: Mon Nov 24, 2003 12:25 am

  • Quote

Post by CyberCobra5 » Thu Jul 07, 2005 9:30 am

Fixed it!
I used ~/.Xmodmap and gnome's sessions and it's working like a charm. I've updated the wiki version of this guide accordingly.

meowsqueak, if you could link to the wiki version of the howto it would be handy. Wiki-version of the howto: http://gentoo-wiki.com/HOWTO_Mouse_Nav_Buttons

Purely for searchability: gdm, gnome, logitech mx700, forward/back buttons
Top
Remillard
Apprentice
Apprentice
User avatar
Posts: 200
Joined: Fri Mar 07, 2003 6:42 pm
Location: Irvine, CA
Contact:
Contact Remillard
Website

  • Quote

Post by Remillard » Mon Jul 11, 2005 5:59 pm

Has anyone ever gotten the Tilt Wheel "buttons" to work? I've looked in xev and it doesn't even seem create an event for this, so I'm not sure how the mouse is suppose to send this contact.
This signature is printed with 100% post-consumer recycled electrons.
Top
Sheepdogj15
Guru
Guru
User avatar
Posts: 430
Joined: Fri Jan 07, 2005 9:02 am
Location: Backyard
Contact:
Contact Sheepdogj15
Website

  • Quote

Post by Sheepdogj15 » Mon Jul 11, 2005 7:31 pm

i'd expect a tilt wheel to count as 5 button events. have you changed your xorg.conf to have 7 buttons (or more if you have more than 2 "regular" buttons)?

if it's not reporting in xev, then either it's an xorg.conf issue or your mouse simply will not work in X (and these days, i consider the latter to be highly unlikely).
Sheepdog
Why Risk It? | Samba Howto
Top
Xithix
Apprentice
Apprentice
User avatar
Posts: 228
Joined: Fri Dec 31, 2004 7:01 pm

  • Quote

Post by Xithix » Thu Jul 14, 2005 10:03 pm

I can't get my scroll wheel to work. I don't think it's a problem with my xorg.conf but I'll post it anyway:

Code: Select all

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "ExplorerPS/2"
	Option	    "Device" "/dev/input/mice"
	Option	    "Buttons" "5"
	Option	    "zAxisMapping" "4 5"
EndSection
I have tried protocols ExplorerPS/2, auto, and ImPS/2
The problem is when I

Code: Select all

cat /dev/input/mice
There is no garbage on the screen when I scroll. Same thing happens with /dev/input/mouse0. Perhaps I'm missing a kernel driver? Here's the part of my menuconfig I think is relevant. I'm running gentoo-sources 2.6.11-r6 on a udev system.

Code: Select all

  │ --- Userland interfaces
  │ --- Mouse interface
  │ [ ]   Provide legacy /dev/psaux device
  │ (1024) Horizontal screen resolution
  │ (768) Vertical screen resolution
  │ < > Joystick interface
  │ < > Touchscreen interface
  │ < > Event interface
  │ < > Event debugging
  │ --- Input I/O drivers
  │ < > Gameport support
  │ < > Serial port line discipline
  │ < > ct82c710 Aux port controller
  │ < > PCI PS/2 keyboard and PS/2 mouse controller
  │ < > Raw access to serio ports
  │ --- Input Device Drivers
  │ --- Keyboards
  │ < >   Sun Type 4 and Type 5 keyboard support
  │ < >   DECstation/VAXstation LK201/LK401 keyboard support
  │ < >   XT Keyboard support
  │ < >   Newton keyboard
  │ [*] Mice
  │ <*>   PS/2 mouse
  │ < >   Serial mouse
  │ < >   DEC VSXXX-AA/GA mouse and VSXXX-AB tablet
  │ [ ] Joysticks
  │ [ ] Touchscreens
  │ [ ] Misc
=======================================
--- USB Input Devices
  │ │          <*> USB Human Interface Device (full HID) support
  │ │          [*]   HID input layer support
  │ │          [ ]     Force feedback support (EXPERIMENTAL)
  │ │          [ ]   /dev/hiddev raw HID device support
  │ │          < > Aiptek 6000U/8000U tablet support
  │ │          < > Wacom Intuos/Graphire tablet support
  │ │          < > KB Gear JamStudio tablet support
  │ │          < > Griffin PowerMate and Contour Jog support
  │ │          < > MicroTouch USB Touchscreen Driver
  │ │          < > eGalax TouchKit USB Touchscreen Driver
  │ │          < > X-Box gamepad support
  │ │          < > ATI / X10 USB RF remote control


My mouse is a USB Logitech BJ-58. Don't be fooled by the PS/2 connector in the picture; it's a converter.

I have not installed the 800dpi logitech-applet or the fast polling hack.
Top
Sheepdogj15
Guru
Guru
User avatar
Posts: 430
Joined: Fri Jan 07, 2005 9:02 am
Location: Backyard
Contact:
Contact Sheepdogj15
Website

  • Quote

Post by Sheepdogj15 » Thu Jul 14, 2005 10:48 pm

hmmmmm... i could have sworn you needed a different driver in your xorg.conf, because it's USB, not PS/2. i don't remember what it was called, though. :?
Sheepdog
Why Risk It? | Samba Howto
Top
Headrush
Watchman
Watchman
User avatar
Posts: 5597
Joined: Thu Nov 06, 2003 12:48 am
Location: Bizarro World

  • Quote

Post by Headrush » Thu Jul 14, 2005 11:09 pm

I don't know if it makes a difference but maybe try "IMPS/2" and not "ImPS/2".

Can you post the relevant part of /var/log/Xorg.0.log?
Top
Xithix
Apprentice
Apprentice
User avatar
Posts: 228
Joined: Fri Dec 31, 2004 7:01 pm

  • Quote

Post by Xithix » Fri Jul 15, 2005 2:22 pm

Posting the relevent log lines in the order that they appear, and breaking a ine when there's stuff in between relevent lines.

Code: Select all

(==) Log file: "/var/log/Xorg.0.log", Time: Thu Jul 14 12:51:36 2005
(==) Using config file: "/etc/X11/xorg.conf"

(**) |-->Input Device "Mouse0"
(II) Module ABI versions:
        X.Org XInput driver : 0.4

(**) Option "Protocol" "ExplorerPS/2"
(**) Mouse0: Device: "/dev/input/mice"
(**) Mouse0: Protocol: "ExplorerPS/2"
(**) Option "CorePointer"
(**) Mouse0: Core Pointer
(**) Option "Device" "/dev/input/mice"
(**) Option "Buttons" "5"
(==) Mouse0: Emulate3Buttons, Emulate3Timeout: 50
(**) Option "ZAxisMapping" "4 5"
(**) Mouse0: ZAxisMapping: buttons 4 and 5
(**) Mouse0: Buttons: 5
(**) Mouse0: SmartScroll: 1
(II) 3rd Button detected: disabling emulate3Button
There's nothing about emuilate 3 button in my xorg.conf. I believe it's case insensitive (Everyone puts "zAxisMapping" in their config but the log shows "ZAxisMapping") but I did try IMPS/2 - same issue .. scroll doesn't work or even display output from

Code: Select all

cat /dev/input/mice
Top
Sheepdogj15
Guru
Guru
User avatar
Posts: 430
Joined: Fri Jan 07, 2005 9:02 am
Location: Backyard
Contact:
Contact Sheepdogj15
Website

  • Quote

Post by Sheepdogj15 » Fri Jul 15, 2005 3:56 pm

have you tried

Code: Select all

Option       "Device" "/dev/psaux"
instead of

Code: Select all

Option       "Device" "/dev/input/mice" 
?
Sheepdog
Why Risk It? | Samba Howto
Top
Xithix
Apprentice
Apprentice
User avatar
Posts: 228
Joined: Fri Dec 31, 2004 7:01 pm

  • Quote

Post by Xithix » Fri Jul 15, 2005 4:48 pm

Code: Select all

/dev/psaux: No such file or directory
Top
Post Reply

171 posts
  • Page 6 of 7
    • Jump to page:
  • Previous
  • 1
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • Next

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy