Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X/Mouse Extra Buttons HOWTO
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
R.D.Olivaw
n00b
n00b


Joined: 11 Nov 2004
Posts: 34
Location: Geneva, Switzerland

PostPosted: Thu Jan 06, 2005 10:09 pm    Post subject: Reply with quote

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:

.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 :)
Back to top
View user's profile Send private message
-=LeXuS=-
n00b
n00b


Joined: 04 Nov 2003
Posts: 56

PostPosted: Tue Jan 11, 2005 2:31 pm    Post subject: Reply with quote

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:

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:

(**) 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:

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
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Thu Jan 27, 2005 7:04 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Mon Jan 31, 2005 8:21 pm    Post subject: Reply with quote

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:
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:
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:
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:
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:
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:
/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:
"/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.
Back to top
View user's profile Send private message
CyberCobra5
n00b
n00b


Joined: 24 Nov 2003
Posts: 30

PostPosted: Thu Jul 07, 2005 12:16 am    Post subject: Reply with quote

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:

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


.imwheelrc
Code:

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

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


xorg.conf
Code:

Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option      "Protocol"     "ExplorerPS/2"
    Option      "Buttons"      "7"
    Option      "ZAxisMapping" "6 7"
    Option      "Device"       "/dev/mouse"
EndSection
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Thu Jul 07, 2005 1:05 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Thu Jul 07, 2005 1:21 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Thu Jul 07, 2005 1:22 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
CyberCobra5
n00b
n00b


Joined: 24 Nov 2003
Posts: 30

PostPosted: Thu Jul 07, 2005 1:54 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Thu Jul 07, 2005 2:07 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
CyberCobra5
n00b
n00b


Joined: 24 Nov 2003
Posts: 30

PostPosted: Thu Jul 07, 2005 2:20 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Thu Jul 07, 2005 2:38 am    Post subject: Reply with quote

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:
"(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
Back to top
View user's profile Send private message
CyberCobra5
n00b
n00b


Joined: 24 Nov 2003
Posts: 30

PostPosted: Thu Jul 07, 2005 3:51 am    Post subject: Reply with quote

nope, didn't work.
scroll wheel still non-functional and thumb buttons are acting as scroll buttons
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Thu Jul 07, 2005 3:55 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
CyberCobra5
n00b
n00b


Joined: 24 Nov 2003
Posts: 30

PostPosted: Thu Jul 07, 2005 5:08 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Thu Jul 07, 2005 5:37 am    Post subject: Reply with quote

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.

Quote:
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
Back to top
View user's profile Send private message
CyberCobra5
n00b
n00b


Joined: 24 Nov 2003
Posts: 30

PostPosted: Thu Jul 07, 2005 9:30 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Remillard
Apprentice
Apprentice


Joined: 07 Mar 2003
Posts: 200
Location: Irvine, CA

PostPosted: Mon Jul 11, 2005 5:59 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Mon Jul 11, 2005 7:31 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Xithix
Apprentice
Apprentice


Joined: 31 Dec 2004
Posts: 228

PostPosted: Thu Jul 14, 2005 10:03 pm    Post subject: Reply with quote

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:
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:
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:
  │ --- 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.
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Thu Jul 14, 2005 10:48 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Thu Jul 14, 2005 11:09 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Xithix
Apprentice
Apprentice


Joined: 31 Dec 2004
Posts: 228

PostPosted: Fri Jul 15, 2005 2:22 pm    Post subject: Reply with quote

Posting the relevent log lines in the order that they appear, and breaking a ine when there's stuff in between relevent lines.
Code:
(==) 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:
cat /dev/input/mice
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Fri Jul 15, 2005 3:56 pm    Post subject: Reply with quote

have you tried
Code:
Option       "Device" "/dev/psaux"
instead of
Code:
Option       "Device" "/dev/input/mice"
?
_________________
Sheepdog
Why Risk It? | Samba Howto
Back to top
View user's profile Send private message
Xithix
Apprentice
Apprentice


Joined: 31 Dec 2004
Posts: 228

PostPosted: Fri Jul 15, 2005 4:48 pm    Post subject: Reply with quote

Code:
/dev/psaux: No such file or directory
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 6 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum