"Back" and "Forward" buttons should work out of the box in Firefox

Bug #24582 reported by Սահակ
18
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Fix Released
Wishlist
xkeyboard-config (Ubuntu)
Fix Released
Wishlist
Unassigned
Nominated for Hardy by Սահակ

Bug Description

Thinkpad laptops have "Back" and "Forward" buttons which don't do anything in
Ubuntu. In windows they take you to previous and next pages, both in IE and Firefox.
Ubuntu should also have the expected behavior in Firefox and other web browsers
out of the box.
Here is a link about how to do it:
http://thinkwiki.org/wiki/How_to_get_special_keys_to_work

Revision history for this message
In , Dave532 (dave532) wrote :

Erm Mozilla doesn't have a refresh or favourites function :)
(please don't dignify that with an answer because I do know what the equiv
functions are - I'm just in one of those weird moods!)

Seriously I didn't know that XF86 v4 supported this but saying that you say it
does then I think it should be supported, although you could say first things
first they don't even work on Windows yet :)

See my Windows bug 64371

I'll confirm this and leave it separate to the Windows bug as it probably
requires different work to be performed.

I'm marking as an enhancement as this isn't really a bug it's a feature request.

Revision history for this message
In , alecf (alecf) wrote :

a cool idea. CC'ing blizzard for help on capturing platform-specific keys. we
could translate these into mozilla-specific "VK_BROWSER_BACK" and so forth so
that other platforms might eventually benefit.

Revision history for this message
In , Timeless-bemail (timeless-bemail) wrote :

*** Bug 87238 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Paulkchen (paulkchen) wrote :

nav triage team:

Would be a very cool feature, but not a mozilla1.0 stopper. Marking mozilla1.1

Revision history for this message
In , alecf (alecf) wrote :

over to new keyboard owner

Revision history for this message
In , Akkana Peck (akkzilla) wrote :

This is mine. I could use some help, though, in finding out what gtk sends for
those keys (not having one of these keyboards).

Revision history for this message
In , Martin-norpan (martin-norpan) wrote :

Just made a small gtk test program, and the results match the #defines in
XFree86keysym.h (not very surprising...) :)

There are more defined there than what's on my keyboard, so you could be ahead
of your time and implement all that fits...

It seems a bit stupid to paste the whole file here, so here is a link to the cvs
repository:

http://cvsweb.xfree86.org/cvsweb/~checkout~/xc/include/XF86keysym.h

It seems there are no corresponding defines in gdk, perhaps a feature request
could be made there.

Revision history for this message
In , Akkana Peck (akkzilla) wrote :

Thanks for the list! I'll look into it. I'll also see if I can get my hands on
one of these keyboards, to test on.

First, though, we need a decision about what to do about missing keys and
whether the DOM event model will ever give us symbols for them (either bug 62067
or bug 13168, whichever is solved first).

Revision history for this message
In , Akkana Peck (akkzilla) wrote :

Bumping out until we get a decision about what to do about bug 13168.

Revision history for this message
In , Vladimire (vladimire) wrote :

*** Bug 84868 has been marked as a duplicate of this bug. ***

Revision history for this message
In , R-contact2009-awhlink-com (r-contact2009-awhlink-com) wrote :

Is this still broken on current builds?

Revision history for this message
In , Kevin Brosnan (kbrosnan) wrote :

*** Bug 307034 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Kyromaster (kyromaster) wrote :

This has now been requested for years. Is it so difficult to implement or why
isn´t this done? It would be a great usability enhancement for many users!

Revision history for this message
Սահակ (petrosyan) wrote :

Thinkpad laptops have "Back" and "Forward" buttons which don't do anything in
Ubuntu. In windows they take you to previous and next pages, both in IE and Firefox.
Ubuntu should also have the expected behavior in Firefox and other web browsers
out of the box.
Here is a link about how to do it:
http://thinkwiki.org/wiki/How_to_get_special_keys_to_work

Revision history for this message
Matthew Garrett (mjg59) wrote :

The keys concerned generate keycodes 234(back) and 233(forward). These aren't
currently bound to any keysyms, but possibly they should be. In any case,
firefox needs to be able to deal with either the raw keycodes (not ideal) or we
need to get X to assign them to XF86Back and XF86Forward and have Firefox pick
those up.

Revision history for this message
In , Rflint (rflint) wrote :

*** Bug 344089 has been marked as a duplicate of this bug. ***

Revision history for this message
Mika Fischer (zoop) wrote :

This is still an issue in edgy. The keys should really be bound to those keysyms and firefox can be easily made to react to them (see http://thinkwiki.org/wiki/How_to_get_special_keys_to_work#Firefox ).

I don't know which package to add to the affected packages for the keysyms bindings...

Changed in firefox:
status: Unconfirmed → Confirmed
Ian Jackson (ijackson)
Changed in firefox:
assignee: ijackson → nobody
Revision history for this message
André Rüdiger (andreruediger-deactivatedaccount) wrote :

This bug depends on xkeybord-config bug https://launchpad.net/products/xorg-server/+bug/20204

Changed in firefox:
status: Unknown → Confirmed
Revision history for this message
Alexander Sack (asac) wrote :

upstream bug tracks this issue. In Progress for us.

Changed in firefox:
assignee: nobody → mozilla-bugs
status: Confirmed → In Progress
Revision history for this message
André Rüdiger (andreruediger-deactivatedaccount) wrote :

Linux support doesn't seem to be very high on the FF priority list [1]. The upstream bug was filed in 2001 and there was no progress since. I'd rather mark this confirmed or rejected since 'in progress' could be a bit misleading...

As Matthew Garret stated we should first bind these buttons to XF86Back and XF86Forward. Bug #20204 describes how to do that. Than we can apply the changes described on Thinkwiki to let Forward an d Backward buttons work out of the box in FF as well.

Thanks,
André

[1] http://wiki.mozilla.org/Firefox3/Firefox_Requirements#Platform_Support

Revision history for this message
André Rüdiger (andreruediger-deactivatedaccount) wrote :

Marking as Confirmed since there's actually no progress (neither in Ubuntu nor upstream). Or should all bugs, that are forwarded upstream be marked as In Progress?

Changed in firefox:
status: In Progress → Confirmed
Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote : Re: [Bug 24582] Re: "Back" and "Forward" buttons should work out of the box in Firefox

El vie, 27-04-2007 a las 12:59 +0000, André Rüdiger escribió:
> Marking as Confirmed since there's actually no progress (neither in
> Ubuntu nor upstream). Or should all bugs, that are forwarded upstream be
> marked as In Progress?

Please, when triaging mozilla related reports, would you please follow
the hints from [1].

Further information can be found at [2].

Thank you André.

[1] https://wiki.ubuntu.com/MozillaTeam/Bugs/States
[2] https://wiki.ubuntu.com/MozillaTeam/Bugs

 status inprogress
--
Hilario J. Montoliu <email address hidden>

Changed in firefox:
status: Confirmed → In Progress
Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Please André Rüdiger, when triaging mozilla related reports would you please

Changed in firefox:
status: Confirmed → In Progress
Revision history for this message
André Rüdiger (andreruediger-deactivatedaccount) wrote :

On 4/27/07, Hilario J. Montoliu (hjmf) <email address hidden> wrote:
> El vie, 27-04-2007 a las 12:59 +0000, André Rüdiger escribió:
> > Marking as Confirmed since there's actually no progress (neither in
> > Ubuntu nor upstream). Or should all bugs, that are forwarded upstream be
> > marked as In Progress?
>
> Please, when triaging mozilla related reports, would you please follow
> the hints from [1].
>
> Further information can be found at [2].
>
> Thank you André.
>
> [1] https://wiki.ubuntu.com/MozillaTeam/Bugs/States
> [2] https://wiki.ubuntu.com/MozillaTeam/Bugs
>
> status inprogress

Hi Hilario,

thx for your reply!

[1] states:
> In Progress
> Aliases: Bug fixing
> Description: Bug is processed upstream or we are currently implementing a solution.

Since the most recent upstream activity for this bug is from 2002-06-25 neither of the two requirements for the 'In Process' state seems to be met.

[2] states:

> In Progress: If you are working on fixing a bug, set it to In Progress so people know what's
> going on

Marking all upstream bugs with state 'NEW' as 'In Progress' seems a bit misleading IMHO.

If I did break a rule by changing the status of this bug I very much apologize.

Cheers,

André

[1] https://wiki.ubuntu.com/MozillaTeam/Bugs/States
[2] https://wiki.ubuntu.com/Bugs/CommonTasks#head-903ef78b981986f22bbccffcc1f1f235f4b88b6c

Changed in firefox:
status: In Progress → Confirmed
Revision history for this message
In , Bugs1m-wisefool (bugs1m-wisefool) wrote :

I've seen that the current workaround suggested by ThinkWiki is to assign the symbols "F19" and "F20" for XF86Back/Forward. This seems incredibly weird. Is it hardcoded somewhere to only accept function keys' keysyms?

Revision history for this message
Guillaume Duveau (guix) wrote :

Under Feisty these keys are now binded to XF86Back and XF86Forward, and they work in Konqueror for instance. Let's hope it will be fixed in Frefox upstream or in Ubuntu.

Revision history for this message
Reinhard Tartler (siretart) wrote :

In gutsy (post tribe2 system), those keys have no longer the keysyms.

Revision history for this message
In , Gul-gmx (gul-gmx) wrote :

What a pity this still doesn't work. Such a basic feature, so little work ...

Revision history for this message
John Vivirito (gnomefreak) wrote :

Is anyone still seeing this in firefox 2.0.0.5?

Revision history for this message
Þórir Magnússon (thorir) wrote :

The bug is still in firefox 2.0.0.6

Revision history for this message
Սահակ (petrosyan) wrote :

This bug is still present in Firefox 2.0.0.8 and Ubuntu 7.10 final release.

Revision history for this message
In , Melyadon+bugzilla-mozilla-org (melyadon+bugzilla-mozilla-org) wrote :

There is a page on thinkwiki related to this problem :
http://www.thinkwiki.org/wiki/Talk:How_to_get_special_keys_to_work#XF86Back_in_Firefox

You don't need to map your special keys to F19/F20. For example, you can add the following in chrome/browser.jar/content/browser/browser.xul under section <keyset id="mainKeyset"> :

<key id="goBackKb" keycode="XF86Back" command="Browser:Back"/>
<key id="goForwardKb" keycode="XF86Forward" command="Browser:Forward"/>

It works for me and the old shortcuts are still there (backspace, ctrl-left).

Could firefox handle those shortcuts ? A user shouldn't have to mess with xul files.

Revision history for this message
In , Melyadon+bugzilla-mozilla-org (melyadon+bugzilla-mozilla-org) wrote :

I spoke too soon. Actually that hack leads to an erratic behaviour of XF86Back and XF86Forward keys (XF86Back still changes the page even when there is no previous page, XF86Forward does change the page but not always for the next page and ALT-GR also changes the page ??).

Under Firefox for Windows, those keys work. Maybe we'll see this bug closed before Firefox 6.0...

Revision history for this message
In , Սահակ (petrosyan) wrote :

According to http://thinkwiki.org/wiki/How_to_get_special_keys_to_work
"XF86Forward and XF86Back do not work correctly in Firefox. You may want to map them to F19 and F20 instead if you use Firefox."
I also added
<key id="goBackKb" keycode="XF86Back" command="Browser:Back"/>
<key id="goForwardKb" keycode="XF86Forward" command="Browser:Forward"/>
And at Firefox was also behaving rather strange.

Revision history for this message
In , Melyadon+bugzilla-mozilla-org (melyadon+bugzilla-mozilla-org) wrote :

Ani, the problem is that other brothers such as Epiphany or Konqueror manage to handle XF86Forward and XF86Back well. I don't want to unmap those keysyms to make Firefox behaves properly (I don't think it is possible to map one key to several keysyms with Xmodmap).

Revision history for this message
Kyromaster (kyromaster) wrote :

t' still present in hardy alpha.
Those button should work out-of-the-box and also the forward and backward buttons on the keyboard should as well, if available.

Revision history for this message
Þórir Magnússon (thorir) wrote : Re: [Bug 24582] Re: "Back" and "Forward" buttons should work out of the box in Firefox

Hi

I have been ubgradeing both the os and Firefox, now I'm in Ubuntu/7.10
(gutsy) Firefox/2.0.0.11 and the backspace button still does not work an
has not worked in any version I have used.

Thorir

2008/1/18, Michael Stather <email address hidden>:
>
> t' still present in hardy alpha.
> Those button should work out-of-the-box and also the forward and backward
> buttons on the keyboard should as well, if available.
>
> --
> "Back" and "Forward" buttons should work out of the box in Firefox
> https://bugs.launchpad.net/bugs/24582
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
In , Ventnor-bugzilla (ventnor-bugzilla) wrote :

Created attachment 300980
Patch

This should work. The conspicuous lack of keyboards with internet keys around me (EVERYONE has a Macbook.... including me) has caused problems with testing but after Googling code I think the keybindings are right. I know the events are sent properly because I changed the switch statement to keys that I do have. This is the exact same thing we do on Windows.

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

+ nsCOMPtr<nsIAtom> command;

This could be just nsIAtom*.

Instead of structuring your code this way, you could create a helper method DispatchCommandEvent so each switch case would just be e.g. "return DispatchCommandEvent(nsWidgetAtoms::Back)". Then you don't need that ugly boolean.

Changed in firefox:
status: Confirmed → In Progress
Revision history for this message
In , Ventnor-bugzilla (ventnor-bugzilla) wrote :

Created attachment 301028
Patch 2

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

Comment on attachment 301028
Patch 2

considerably nicer, thanks!

Revision history for this message
In , Ventnor-bugzilla (ventnor-bugzilla) wrote :

Comment on attachment 301028
Patch 2

This is a simple patch to significantly improve accessibility and platform parity.

Revision history for this message
In , Ventnor-bugzilla (ventnor-bugzilla) wrote :

Comment on attachment 301028
Patch 2

This patch doesn't seem to really work, as other apps must intercept X events to get to these keys.

Revision history for this message
In , Ventnor-bugzilla (ventnor-bugzilla) wrote :

Created attachment 301434
Possible new patch

Attaching this here so I can test it on a computer with internet keys.

Revision history for this message
In , Ventnor-bugzilla (ventnor-bugzilla) wrote :

Comment on attachment 301434
Possible new patch

Turns out that is what we want to do after all, its just that this kind of code is used for global listening of special keys (like media players) and properly mapped keyboards will send the event anyway.

Revision history for this message
In , Mtschrep (mtschrep) wrote :

Comment on attachment 301028
Patch 2

Michael are you gunning for the oldest bug fixed award :-P?

Revision history for this message
In , Reed Loden (reed) wrote :

Checking in widget/src/gtk2/nsWindow.cpp;
/cvsroot/mozilla/widget/src/gtk2/nsWindow.cpp,v <-- nsWindow.cpp
new revision: 1.257; previous revision: 1.256
done
Checking in widget/src/gtk2/nsWindow.h;
/cvsroot/mozilla/widget/src/gtk2/nsWindow.h,v <-- nsWindow.h
new revision: 1.84; previous revision: 1.83
done

Revision history for this message
Jeffrey Baker (jwbaker) wrote :

The fix for this landed upstream today. Presumably the fix will be included in Firefox 3.0.

Changed in firefox:
status: In Progress → Fix Released
Revision history for this message
In , Reed Loden (reed) wrote :

*** Bug 418276 has been marked as a duplicate of this bug. ***

Revision history for this message
Սահակ (petrosyan) wrote :

Upstream Firefox 3.0 works binds "Back" and "Forward" buttons to XF86_Back and XF86_Forward keysyms.

The problem is that Ubuntu does not bind "Back" and "Forward" buttons to XF86_Back and XF86_Forward keysyms on ThinkPad laptop.

Maybe this bug should be reassigned to hotkey package?

Revision history for this message
Reinhard Tartler (siretart) wrote : Re: [Bug 24582] Re: "Back" and "Forward" buttons should work out of the box in Firefox

Ani <email address hidden> writes:

> The problem is that Ubuntu does not bind "Back" and "Forward" buttons to
> XF86_Back and XF86_Forward keysyms on ThinkPad laptop.

This is launchpad bug #20204. Right, a pretty old one.

--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

Սահակ (petrosyan)
Changed in xkeyboard-config:
assignee: mozilla-bugs → canonical-xorg
Revision history for this message
Սահակ (petrosyan) wrote :

this bug has been fixed in Ubuntu 8.10

Changed in xkeyboard-config:
status: In Progress → Fix Released
Changed in xkeyboard-config (Ubuntu):
status: Fix Released → New
status: New → Fix Released
Changed in firefox:
importance: Unknown → Wishlist
Curtis Hovey (sinzui)
Changed in xkeyboard-config (Ubuntu):
assignee: Registry Administrators (registry) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.