GNOME Bugzilla – Bug 169214
yelp should use Back/forward mouse buttons
Last modified: 2018-05-22 12:39:40 UTC
This bug has been opened here: https://bugzilla.ubuntu.com/7089 "In mozilla firefox, the left and right "extra" buttons on my Logitech MX310 do "the right thing" (i.e. go back and forward in browser history). In yelp, they don't to this. It would be very nice if this worked the same everywhere. The buttons report as Button 6 and Button 7."
As far as I know, GNOME doesn't support "extra" buttons. This is discussed in bug 108775. In that thread, it is said that it would be very hard to get "extra" buttons working, but If (as you say) Firefox does it, then it should be possible for GNOME to do it too, I guess?
The problem is that a 2nd scrollwheel will generate the same events as these buttons. This was also discussed for Epiphany in bug 148557 where we added the necessary prefs to make 2nd wheel scroll horizontally. IMHO that's the right thing to do, since gtk+ scrolled window with horizontal scrollbars do the same thing when you use the 2nd scrollwheel in the content area.
Perhaps there should be a gnome-wide mouse preference, so that people can select what kind of mouse they have, if they have horizontal scroll, and/or side buttons. What do you think?
*** Bug 612249 has been marked as a duplicate of this bug. ***
You want to map buttons 8 and 9 to the back/foward buttons. I've done this rhythmbox and file-roller. If i get chance i'll write a patch
*** Bug 557749 has been marked as a duplicate of this bug. ***
Tested with a borrowed mouse. The back and forward buttons are reported as buttons 8 and 9. The problem is, if I try to handle these on the top-level window, I almost never receive them, because most widgets consume button-press-event.
Created attachment 205664 [details] [review] Bad first attempt at implementing Back/Forward buttons This doesn't work everywhere. Child widgets eat button-press-event. I tried connecting to the signal on the child widgets, but that doesn't always work. * Connecting on the menubar does work. Otherwise the menubar treats the buttons as normal clicks. * Connecting on the back and forward buttons does nothing. * Connecting on the location entry does nothing. Pressing back/forward over the text entry works, though it puts a cursor in the entry, seemingly without giving focus. Pressing over the down-arrow button does not work, and focuses that button. * Connecting on the view does nothing. Pressing works when you're over a link. When you're not over a link, double-clicking back/forward works. Strange. Basically, GTK+'s event handling makes this much harder than it ought to be.
Not sure if this helps or not, but this is how I did implemented this for rhythmbox: https://bugzilla.gnome.org/show_bug.cgi?id=316257
That's just for the status icon though, right? Not for the main RB window?
Oops. Yes. Here's how I did it for file-roller: https://bugzilla.gnome.org/show_bug.cgi?id=326017 Hope this helps :)
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/yelp/issues/6.