After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 314800 - Forward / back mouse buttons should work in nautilus
Forward / back mouse buttons should work in nautilus
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: A. Walton
Nautilus Maintainers
: 416402 592027 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-08-29 22:34 UTC by James
Modified: 2009-08-17 03:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
multi-button meese support (1.92 KB, patch)
2008-04-30 03:50 UTC, A. Walton
none Details | Review
updated (9.14 KB, patch)
2008-05-21 18:32 UTC, A. Walton
committed Details | Review

Description James 2005-08-29 22:34:13 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.
Comment 1 Christian Neumair 2005-09-03 21:27:46 UTC
Thanks for your bug report!
CCing GTK+ crew - is there any possibility to detect the mapping of additional
mouse buttons?
Comment 2 James 2005-09-04 01:34:26 UTC
I am not sure if this would help or not, but firefox seems to be able to pick up
the additional buttons.
Comment 3 pavel 2005-09-06 13:44:23 UTC
yep, I can confirm that this is really annoying
Comment 4 Christian Neumair 2005-09-14 21:02:18 UTC
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.
Comment 5 James 2005-09-14 21:07:15 UTC
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
Comment 6 Max Lelubre 2006-12-22 12:24:19 UTC
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)
Comment 7 Julian Sikorski 2007-06-10 15:44:54 UTC
Nothing picked up buttons here (Logitech VX Revolution). I am using evdev driver.
Comment 8 Cosimo Cecchi 2008-04-09 15:28:11 UTC
*** Bug 416402 has been marked as a duplicate of this bug. ***
Comment 9 mruwek.debian 2008-04-17 01:58:12 UTC
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.
Comment 10 A. Walton 2008-04-30 03:50:21 UTC
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?
Comment 11 Cosimo Cecchi 2008-04-30 08:53:37 UTC
(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.
Comment 12 Cesare Tirabassi 2008-04-30 09:14:30 UTC
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.
Comment 13 A. Walton 2008-05-21 18:32:54 UTC
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.
Comment 14 Mohamed Bana 2008-05-29 23:44:50 UTC
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.
Comment 15 atenrok 2009-02-22 23:16:51 UTC
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.
Comment 16 A. Walton 2009-02-22 23:33:28 UTC
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. 
Comment 17 Cosimo Cecchi 2009-02-22 23:44:22 UTC
The patch looks good to me, let's get this in after branching!
Comment 18 atenrok 2009-02-22 23:56:58 UTC
(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. 


Comment 19 atenrok 2009-02-22 23:58:23 UTC
>  Search and HomePage can be added, though that's another feature
request.

do you want me to submit it separately?
Comment 20 Cosimo Cecchi 2009-04-22 08:58:50 UTC
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
Comment 21 A. Walton 2009-08-17 03:24:56 UTC
*** Bug 592027 has been marked as a duplicate of this bug. ***