The default bug view has changed. See this FAQ.

Supporting Internet keys in XFree86 4

RESOLVED FIXED in mozilla1.9beta4

Status

()

Core
Keyboard: Navigation
--
enhancement
RESOLVED FIXED
16 years ago
7 years ago

People

(Reporter: Martin Norbäck, Assigned: Michael Ventnor)

Tracking

(Depends on: 1 bug)

Trunk
mozilla1.9beta4
x86
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

16 years ago
I have a Microsoft Natural Keyboard Pro, which has "internet keys".
They are Back, Forward, Stop, Refresh, Search, Favorites, and Web/Home.
The all correspond nicely to commands in Mozilla.

When using XFree86 4, these keys generate keysyms
XF86Back, XF86Forward, XF86Stop, XF86Refresh, XF86Search, XF86Favorites, and
XF86HomePage.

I imagine it would be a simple task to capture these keysyms.

Comment 1

16 years ago
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.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

16 years ago
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.

Updated

16 years ago
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.0

Comment 3

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

Comment 4

16 years ago
nav triage team:

Would be a very cool feature, but not a mozilla1.0 stopper. Marking mozilla1.1
Target Milestone: mozilla1.0 → mozilla1.1

Updated

15 years ago
Depends on: 127812

Updated

15 years ago
No longer depends on: 127812

Updated

15 years ago
Blocks: 127812

Comment 5

15 years ago
over to new keyboard owner
Assignee: alecf → aaronl
Status: ASSIGNED → NEW

Comment 6

15 years ago
This is mine.  I could use some help, though, in finding out what gtk sends for
those keys (not having one of these keyboards).
Assignee: aaronl → akkana
(Reporter)

Comment 7

15 years ago
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.

Comment 8

15 years ago
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).
Status: NEW → ASSIGNED
Depends on: 13168, 62067

Comment 9

15 years ago
Bumping out until we get a decision about what to do about bug 13168.
No longer depends on: 62067
Target Milestone: mozilla1.1alpha → Future

Comment 10

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

Comment 11

14 years ago
Is this still broken on current builds?

Comment 12

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

Comment 13

12 years ago
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!
*** Bug 344089 has been marked as a duplicate of this bug. ***
Assignee: akkzilla → nobody
Status: ASSIGNED → NEW
QA Contact: bugzilla → keyboard.navigation

Comment 15

10 years ago
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?

Comment 16

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

Comment 17

10 years ago
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.

Comment 18

10 years ago
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...

Comment 19

9 years ago
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.

Comment 20

9 years ago
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).
(Assignee)

Comment 21

9 years ago
Created attachment 300980 [details] [diff] [review]
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.
Assignee: nobody → ventnor.bugzilla
Status: NEW → ASSIGNED
Attachment #300980 - Flags: superreview?(roc)
Attachment #300980 - Flags: review?(roc)
Priority: P3 → --
Target Milestone: Future → ---
+    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.
(Assignee)

Comment 23

9 years ago
Created attachment 301028 [details] [diff] [review]
Patch 2
Attachment #300980 - Attachment is obsolete: true
Attachment #301028 - Flags: superreview?(roc)
Attachment #301028 - Flags: review?(roc)
Attachment #300980 - Flags: superreview?(roc)
Attachment #300980 - Flags: review?(roc)
Comment on attachment 301028 [details] [diff] [review]
Patch 2

considerably nicer, thanks!
Attachment #301028 - Flags: superreview?(roc)
Attachment #301028 - Flags: superreview+
Attachment #301028 - Flags: review?(roc)
Attachment #301028 - Flags: review+
(Assignee)

Comment 25

9 years ago
Comment on attachment 301028 [details] [diff] [review]
Patch 2

This is a simple patch to significantly improve accessibility and platform parity.
Attachment #301028 - Flags: approval1.9?
(Assignee)

Comment 26

9 years ago
Comment on attachment 301028 [details] [diff] [review]
Patch 2

This patch doesn't seem to really work, as other apps must intercept X events to get to these keys.
Attachment #301028 - Attachment is obsolete: true
Attachment #301028 - Flags: approval1.9?
(Assignee)

Comment 27

9 years ago
Created attachment 301434 [details] [diff] [review]
Possible new patch

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

Comment 28

9 years ago
Comment on attachment 301434 [details] [diff] [review]
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.
Attachment #301434 - Attachment is obsolete: true
(Assignee)

Updated

9 years ago
Attachment #301028 - Attachment is obsolete: false
Attachment #301028 - Flags: approval1.9?

Comment 29

9 years ago
Comment on attachment 301028 [details] [diff] [review]
Patch 2

Michael are you gunning for the oldest bug fixed award :-P?
Attachment #301028 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
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
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta4
Duplicate of this bug: 418276

Updated

7 years ago
You need to log in before you can comment on or make changes to this bug.