GNOME Bugzilla – Bug 314800
Forward / back mouse buttons should work in nautilus
Last modified: 2009-08-17 03:24:56 UTC
SSIA - mouses with forward and back buttons (like the logitech mx500 or the microsoft explorer mouse) should be able to navigate nautilus in browser mode.
Thanks for your bug report! CCing GTK+ crew - is there any possibility to detect the mapping of additional mouse buttons?
I am not sure if this would help or not, but firefox seems to be able to pick up the additional buttons.
yep, I can confirm that this is really annoying
I've just tried out firefox 1.0.3 and it doesn't seem to pick up the mouse buttons correctly. I'm using ImPS/2 + MS IntelliMouse Optical.
you need to be using the explorerps2 driver. this works for me (logitech mx310/ xfree): Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ExplorerPS/2" Option "Buttons" "7" Option "ZAxisMapping" "4 5" EndSection
One year after i want to say : (i dont know if its ok to say this here) My brother want this feature ! For information : On my computer I use http://imwheel.sourceforge.net/ and after I can use the forward and back buttons in firefox (1.5/2). I did that after having read http://www.andesi.org/index.php?node=106 (french)
Nothing picked up buttons here (Logitech VX Revolution). I am using evdev driver.
*** Bug 416402 has been marked as a duplicate of this bug. ***
I am using Logitech Click! Plus with evdev and in Firefox 3b5 these buttons work just great. Why don' t you look at the code from Mozilla and implement something similiar in Nautilus? "Translating" mouse buttons to keybord events with xbindkeys or imwheel is really annoying.
Created attachment 110141 [details] [review] multi-button meese support After some head-scratching and wondering why it isn't really well documented, I managed to figure out how Firefox 3 is doing it; just catching button events for "button 8" and "button 9" seems to work for "back" and "forward" respectively. Would be nice to have that written somewhere for future reference. Anyways, here's a patch that catches these button presses for navigation windows (i.e. not spatial windows). If any spatial users want to comment on whether not this is desired behavior, I'm all ears. I also threw in a todo comment for possibly allowing the buttons it catches to be configurable through GConf. I'm not sure if we want this or not; is it documented somewhere that X always gives us "8" for "back", etc, and if it is, do we still want the user to be able to configure it?
(In reply to comment #10) > I also threw in a todo comment for possibly allowing the buttons it catches to > be configurable through GConf. I'm not sure if we want this or not; is it > documented somewhere that X always gives us "8" for "back", etc, and if it is, > do we still want the user to be able to configure it? After a bit of googling I found out it seems 8 and 9 are the buttons assigned from X to Logitech models (and maybe other vendors), but there could be some others with different button numbers. So yes, IMHO a GConf key would be handy here.
On my logitech mouse (MX518), the thumb buttons are mapped by X to button 6 (back) and 7 (forward), so, yes, it would seem sensible that 8 and 9 are not hardcoded.
Created attachment 111290 [details] [review] updated Updated to grab the buttons from GConf. I added sanity checks that cut off the max button ID at 14, as that's the highest number I could find through my Googling on the issue (the MX1000 apparently has 14 "buttons"). If there are mice with higher buttons we can move that later. I really wish the X guys would have defines for this kind of thing, or at least some documentation, but alas. I also left it defaulting to 8/9 because that's what all of the code on the issue I could find has (Firefox uses this, and a few other websites suggest the same). If there are any other issues left outstanding, let me know. And someone other than me testing it would be very appreciated.
It would be great if the back and forward buttons also worked under Eclipse, i noticed that under Vista with Logitech MX518, clicking the back or forward buttons takes me to the last point where i edited the source code. I would love to have this feature in gnome.
Forward/Back should be mapped to XF86Forward/XF86Back and one can map these the way he wants in .Xmodmap. By default this will allow to utilize similar pair of buttons on some internet/multimedia keyboards. Also Home button could be mapped to XF86HomePage and Search button to XF86Search.
XF86Forward/XF86Back are already mapped to the forward and back actions, see http://svn.gnome.org/viewvc/nautilus/trunk/src/nautilus-navigation-window.c line 916. Search and HomePage can be added, though that's another feature request. The problem is most distros don't automatically map XF86Forward/Back to mouse buttons, which means most everyone doesn't get this action (see the long, long forum posts, wikipages, and other resources for whichever distro you use about enabling this). The patch, otoh, makes sure that everyone gets it for free, which is the reason why Mozilla also ships this way.
The patch looks good to me, let's get this in after branching!
(In reply to comment #16) > The problem is most distros don't automatically map XF86Forward/Back > to mouse buttons, which means most everyone doesn't get this action (see the > long, long forum posts, wikipages, and other resources for whichever distro you > use about enabling this). AFAIK this all was true before evdev times. Now all you need is to fix your .Xmodmap (which imho, distro maintainers could have taken care of). Anyway, even if one has to fix it manually it would be nice to find that nautilus already works naturally.
> Search and HomePage can be added, though that's another feature request. do you want me to submit it separately?
I rebased the patch and committed it to master. commit 9826f177cb72fc9f595356b773f51059bef6cd1e Author: Andrew Walton <awalton@gnome.org> Date: Wed Apr 22 10:57:05 2009 +0200 Let forward/back mouse buttons work Install a handler to link forward/back mouse buttons to forward/back actions in NautilusNavigationWindow, with a preference to set the right X button number in GConf. Signed-off-by: Cosimo Cecchi <cosimoc@gnome.org
*** Bug 592027 has been marked as a duplicate of this bug. ***