View previous topic :: View next topic |
Author |
Message |
gentoofrm n00b
Joined: 05 Mar 2004 Posts: 39
|
Posted: Tue Mar 16, 2004 4:52 am Post subject: Mouse: Side or Thumb Buttons |
|
|
This is for any mouse with 6 or 7 buttons.
The side (thumb) button of a 6-button mouse will work as a "BACK" button (going back to a previous page in a web browser, for example).
Quote: | 1 Left
2 Middle (when you press the wheel, it becomes button #2)
3 Right
4 Wheel Up
5 Wheel Down
6 Side or Thumb Button #1
7 Side or Thumb Button #2 |
There are lots of tips and Q&As on this topic in the forum.
Unfortunately, one single thread couldn't solve my problem.
So, I merged a few of them as follows:
This XF86Config or XF86Config-4 is for USBMOUSE. If you use PS/2, change it.
Code: | 1] $ nano /etc/X11/XF86Config-4
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Device" "/dev/usbmouse"
#Option "Protocol" "ImPS/2"
#Option "ZAxisMapping" "4 5"
Option "Protocol" "ExplorerPS/2"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"
EndSection |
Code: | 2] $ emerge imwheel* |
Code: | 3-a] backup imwheelrc
$ cp /etc/X11/imwheelrc /etc/X11/imwheelrc.0 |
Code: | 3-b] delete everything in imwheelrc and add
$ nano /etc/X11/imwheelrc
"(null)"
None, Thumb1, Alt_L|Left,1
None, Thumb2, Alt_L|Right,1
"^Mozilla.*"
None, Thumb1, Alt_L|Left,1
None, Thumb2, Alt_L|Right,1
"^firefox.*"
None, Thumb1, Alt_L|Left,1
None, Thumb2, Alt_L|Right,1
".*"
None, Thumb1, Alt_L|Left,1
None, Thumb2, Alt_L|Right,1 |
Code: | 5] $ nano -w /etc/X11/Xmodmap
pointer = 1 2 3 6 7 4 5 |
Code: | 6] if you use kde-3.2.0
$ nano /etc/X11/Sessions/kde-3.2.0
#!/bin/sh
exec xmodmap -e "pointer = 1 2 3 6 7 4 5" &
exec imwheel -p -k -b "000067" -f &
/usr/kde/3.2/bin/startkde |
7] reboot and enjoy!
-----------------------------
[Unnecessary Steps]
~/.xmodmap
~/.xinitrc
~/.imwheelrc
-----------------------------
[Troubleshooting]
Code: | 1] in user's terminal, not root's
$ xmodmap -pp
There are 7 pointer buttons defined.
Physical Button
Button Code
1 1
2 2
3 3
4 6
5 7
6 4
7 5 |
Code: | 2] checking button numbers
$ /usr/X11R6/bin/uxterm
$ xev |
if your KDE/GNOME session deos not allow you to use "uxterm,"
log out and log into "Xsession."
3] references
https://forums.gentoo.org/viewtopic.php?t=121670
https://forums.gentoo.org/viewtopic.php?t=130295
https://forums.gentoo.org/viewtopic.php?t=148645
https://forums.gentoo.org/viewtopic.php?t=148711 |
|
Back to top |
|
|
troki n00b
Joined: 11 Sep 2002 Posts: 28
|
Posted: Tue Mar 16, 2004 10:37 am Post subject: |
|
|
Hrm. Is it possible to send button1 events through imwheel ?
( non fifo ) |
|
Back to top |
|
|
Bastux Guru
Joined: 15 Dec 2002 Posts: 369 Location: France - Paris
|
Posted: Tue Mar 16, 2004 11:11 am Post subject: |
|
|
not sure but my imwheelrc is :
Quote: |
"Mozilla*"
None, Left, Alt_L|Left
None, Right, Alt_L|Right
None, Up, Alt_L|Left,1
None, Down, Alt_L|Right,1
"(null)"
None, Up, Alt_L|Left,1
None, Down, Alt_L|Right,1
"*"
None, Left, Alt_L|Left
None, right, Alt_L|Right
|
and it works for both firefox and mozilla
Is it necessary to put 2 sections? |
|
Back to top |
|
|
ed0n l33t
Joined: 23 Apr 2003 Posts: 638 Location: Prishtine/Kosove
|
Posted: Tue Mar 16, 2004 11:38 am Post subject: |
|
|
thanks , I was looking for this these days , my mouse now is really usefull |
|
Back to top |
|
|
flow666 n00b
Joined: 01 Jul 2003 Posts: 74 Location: Diepholz
|
Posted: Wed Mar 17, 2004 8:30 am Post subject: |
|
|
If I have two mouse devices, is it possible to tell Xmodmap to use the second device? _________________ Ringwald's Gesetz der Haushaltsgeometrie:
"Alle horizontalen Flächen werden in kurzer Zeit mit Gerümpel bedeckt." |
|
Back to top |
|
|
seppe Guru
Joined: 01 Sep 2003 Posts: 431 Location: Hove, Antwerp, Belgium
|
Posted: Wed Mar 17, 2004 1:38 pm Post subject: |
|
|
I finally have my MX700 working, but I have another imwheelrc:
Code: |
"(null)"
None, Left, Alt_L|Left,1
None, Right, Alt_L|Right,1
|
And it works under FireFox & Mozilla! _________________ nitro-sources, because between stable and experimental there exists only speed
Latest release I made: 2.6.13.2-nitro1 |
|
Back to top |
|
|
AugustineF n00b
Joined: 19 Dec 2003 Posts: 31
|
Posted: Sun Mar 28, 2004 2:04 am Post subject: |
|
|
funny thing is, this works perfectly even on 6 button mice.
I had a 7 botton mouce before and it was working correctly, but when I got a 6 button wireless mouse, I changed the button nos to 6 and since then the side button and the middle button (wheel click) were producing the same event).
But using the tip as it is, now the Left button produces a different event.
thanks a lot for this tip |
|
Back to top |
|
|
ck42 l33t
Joined: 31 Jul 2003 Posts: 789
|
Posted: Sun Mar 28, 2004 9:37 pm Post subject: |
|
|
Is it possible to set the thumb button to do some other function? My favorite on my windoze box is to minimize the active window. |
|
Back to top |
|
|
Greven Tux's lil' helper
Joined: 28 Jul 2002 Posts: 138
|
Posted: Sun Mar 28, 2004 10:40 pm Post subject: |
|
|
Using what Gentoofrm posted.... I lost the power to use my scroll wheel and my thumb buttons move the pages up and down. I want my thumb buttons to go foreword and backwords in web surfing and my scroll whell to scroll.
Thanks. _________________ veritas vos liberabit...
Linux User Number: 346805
Wine-Wiki
AMD 64 3500+ | MSI "K8T NEO2-FIR" | mushkin Dual Channel DDR 400 |
|
Back to top |
|
|
uglyb0b Apprentice
Joined: 07 Sep 2003 Posts: 280
|
Posted: Mon Mar 29, 2004 12:49 am Post subject: |
|
|
Oh, that's hot. _________________ Blog.
Linux geek and Mac whore. |
|
Back to top |
|
|
Greven Tux's lil' helper
Joined: 28 Jul 2002 Posts: 138
|
Posted: Mon Mar 29, 2004 3:22 pm Post subject: |
|
|
*BUMP*
I would like to use my scroll whell please.
Thanks. _________________ veritas vos liberabit...
Linux User Number: 346805
Wine-Wiki
AMD 64 3500+ | MSI "K8T NEO2-FIR" | mushkin Dual Channel DDR 400 |
|
Back to top |
|
|
rentonj7 n00b
Joined: 18 Mar 2004 Posts: 48 Location: Stroudsburg, Pa
|
Posted: Mon Mar 29, 2004 11:23 pm Post subject: |
|
|
Greven, i had the same problem. I don't know what kind of mouse you have, but I know that for my A4Tech WOP-35PU, i had to change:
Option "ZAxisMapping" "6 7"
to:
Option "ZAxisMapping" "4 5"
I'm still working on getting it's second wheel working for horizontal scroll, and the other buttons to behave...
good luck |
|
Back to top |
|
|
glawrie Tux's lil' helper
Joined: 12 Oct 2003 Posts: 88 Location: Maidenhead, UK
|
Posted: Tue Mar 30, 2004 8:16 pm Post subject: |
|
|
Could someone clarify two things please?Why is it necessary to do the Xmodmap business - why not just put Z Axis mapping to buttons 4 5? If the remapping is necessary, how do you get the Xmodmap entry to auto-load when Gentoo starts? - I've tried creating an /etc/X11/Xmodmap file with the mapping in it, but it doesn't seem to do anything. Thanks in advance for your help. I'm new at this, and am sure I'm missing something obvious... but not sure what that is... |
|
Back to top |
|
|
rentonj7 n00b
Joined: 18 Mar 2004 Posts: 48 Location: Stroudsburg, Pa
|
Posted: Tue Mar 30, 2004 8:42 pm Post subject: |
|
|
glawrie, as far as i can tell, if you just want to use your wheel, just set the Z Axis mapping to 4 5, the xmodmap controlls how the thumb buttons are used. |
|
Back to top |
|
|
glawrie Tux's lil' helper
Joined: 12 Oct 2003 Posts: 88 Location: Maidenhead, UK
|
Posted: Tue Mar 30, 2004 10:39 pm Post subject: |
|
|
rentonj7 wrote: | glawrie, as far as i can tell, if you just want to use your wheel, just set the Z Axis mapping to 4 5, the xmodmap controlls how the thumb buttons are used. |
Thanks for the confirmation - I've got a Logitech MX500 (USB mouse, wheel, left, right and wheel buttons plus 5 others) and manged to get the wheel working with Z Axis mapped to 4 5. But I'd like to get the other buttons working if I can - so I'll keep trying to work out how it all works: so if you know how to get the Xmodmap changes to occur at the start of a session, I'd value that info. What I don't yet understand is why to get the other buttons working, you need to remap the 4 5 buttons (i.e. wheel up / down) to other button numbers: can't one just get imwheel (or whatever) to simply use the higher number buttons instead?
Regards
Gavin. |
|
Back to top |
|
|
YopWongSapn l33t
Joined: 26 Jan 2004 Posts: 627
|
Posted: Fri Apr 02, 2004 5:31 am Post subject: |
|
|
I spent some time figuring out how to get this tutorial to work in Gnome, and I thought I'd post my findings.
Follow this tutorial until you get to step 6. From there:
Code: | # nano /etc/X11/Sessions/Gnome
...
# xkb and xmodmap don't play nice together
if [ -z "$XKB_IN_USE" ]; then
if [ -f "$rh6sysmodmap" ]; then
xmodmap "$rh6sysmodmap"
fi
if [ -f "$sysmodmap" ]; then
xmodmap "$sysmodmap" && imwheel -p -k -b "000067" -f
fi
... |
It's a messy, but this will run imwheel for every user that logs in. Gnome runs Xmodmap by default. _________________ Gentoo...it's like wiping your ass with silk. Or sandpaper. |
|
Back to top |
|
|
wizard69 Apprentice
Joined: 22 Sep 2003 Posts: 178 Location: Berlin
|
Posted: Wed May 19, 2004 3:55 pm Post subject: |
|
|
this howto worked fine for me in XFree86 since i moved to xorg i can't get the side buttons of my mx700 to work anymore does someone have a solution to this problem |
|
Back to top |
|
|
Nate_S Guru
Joined: 18 Mar 2004 Posts: 414
|
Posted: Fri May 21, 2004 12:58 am Post subject: |
|
|
Some of you who are wanting to do more advanced things should take a look at some of the origional threads such as this one
https://forums.gentoo.org/viewtopic.php?t=98028
to answer some real quickly, for a horizontal scroll wheel I think you need to use ZAxisMapping="4 5 6 7" or something like that
The place I've been putting the xmodmap line is in /etc/X11/xinit/.Xmodmap
take a look in /etc/X11/xinit/xinitrc, you'll notice it'll use that file if it's there (I belive /the thing it refers to in /usr/share is a symlink to the stuff in /etc) |
|
Back to top |
|
|
Naughtyus Guru
Joined: 14 Jul 2002 Posts: 463 Location: Vancouver, BC
|
Posted: Mon Jun 28, 2004 1:07 am Post subject: |
|
|
Thank you very much!
This is the only howto on this topic that has worked perfectly without any modification for me. |
|
Back to top |
|
|
Bollenator n00b
Joined: 12 Apr 2004 Posts: 44 Location: WA, USA
|
Posted: Mon Jun 28, 2004 8:03 pm Post subject: |
|
|
Naughtyus wrote: | Thank you very much!
This is the only howto on this topic that has worked perfectly without any modification for me. |
Me too!
Glawrie,
You might be able to make the mouse settings start up as a script depending on your WM. I use XFce4 and I just created a very simple bash script that I put in ~/Desktop/Autostart that XFce reads and starts up every time the WM is started up. I'm sure there are other ways for other WMs (fvwm has a StartFunction or something in the .fvwm2rc file, KDE/Gnome not sure) so you may want to explore the forum looking for things referring to "default start up applications" or something similar. Good luck!
Just for fun:
Code: | #!/bin/sh
xmodmap -e "pointer = 1 2 3 6 7 4 5" &
imwheel -p -k -b "000067" -f & |
Just make sure to Code: | $ chmod a+x ~/Desktop/Autostart/mouse #or whatever you named the script |
This isn't necessarily of my own design but I pieced it together from some of the mouse-button HOW-TOs on these forums. HTH! _________________ Bollenator
"This one's a mystery, wrapped in an enigma, baked in a conundrum, splashed with brain-twisters, diced, and served cold on a riddle roll with secret sauce." |
|
Back to top |
|
|
|