In most Windows apps, when you see a plus sign next to a collapsed branch of a tree, you can press the Plus key (either the one next to Backspace or the one on the number pad) to expand that branch, or press the Minus key to close it again. These keys don't work in the Mozilla 2002031104 History tree (under Windows). One advantage of Mozilla is that it supports the keyboard so well - can we get this working here? Thanks! Edward Mendelson Contributing Editor PC Magazine
Tested several apps on Windows 98: mIRC 6 prefs no Netscape 4 prefs only number pad +,- Windows Explorer folder tree only number pad +,- Winamp prefs only number pad +,- IE 6 security settings only number pad +,- IE 6 advanced prefs only number pad +,- IE 6 favorites sidebar only number pad +,- All of these trees, as well as Mozilla's, support the left and right arrow keys for collapsing and expanding branches. Most support number pad +,- but none support -/=/+ in the main part of the keyboard. This bug isn't specific to history; it also happens in prefs and in the mail folder pane. -> Tree widget.
Assignee: blaker → hewitt
Status: UNCONFIRMED → NEW
Component: History: Global → XP Toolkit/Widgets: Trees
Ever confirmed: true
QA Contact: claudius → shrir
Summary: Plus/Minus keys won't xpand/contract branches in history tree → Plus/Minus keys won't expand/contract branches in history tree
Jesse is right: other apps' trees only respond to the Plus/Minus keys on the numberpad. I was wrong to mention the Plus/Minus keys near the Backspace - other apps don't respond to those. So a bugfix would cause the trees in history, etc., to respond to the Plus/Minus keys on the numberpad, but NOT the Plus/Minus keys near the backspace. Thanks again... Edward Mendelson Contributing Editor PC Magazine
This bug is a part of bug 135749, but much easier to fix. So I want to put a patch here to let "+", "-" work first, then study how to support "*" and Ctrl+"+" later.
Created attachment 78304 [details] [diff] [review] patch just copy the implementation of "vk_left" and "vk_down" but change event from "keypress" to "keydown", because event handler does not send "keypress" event when the vk_add was pressed.
Hi, Jesse, I found Mozilla maps many keys code to NS_VK_SUBTRACT: 1. Windows, Numpad '-'(code 109) and '-' near the backspace (code 189); 2. GTK, GDK_minus, GDK_KP_Subtract and GDK_underscore So it is why Numpad '-' and '-' near the backspace do the same work. I'm afraid I can not change this way :(
akkana, what do you think about comment 5?
Mapping GDK_underscore to VK_SUBTRACT sounds wrong, but looking at nsIDOMKeyEvent.idl and nsGUIEvent.h I don't see an NS_VK or DOM_VK code for underscore. I wonder what we're supposed to use for that? What do the Windows and Mac event handling code do for the underscore keys? Distinguishing keypad minus from regular minus looks like the same issue: neither the DOM key event model, nor the derived Mozilla model, offer separate symbols to use for this. Joki, what is the W3C position on this -- are we not supposed to be able to distinguish the two '-' keys, or use an underscore at all? Can we add DOM_VK symbols for non-keypad dash and underscore? Should we add them in the mozilla event model even if the dom doesn't distinguish them? (Probably not, since then people writing DOM-compatible event handling code would get a different result in mozilla than in apps which strictly followed the dom spec.) Also adding jst in case he knows what the W3C is doing for dom events.
Windows mapping code is: http://lxr.mozilla.org/seamonkey/source/widget/src/windows/nsWindow.cpp#2613 GTK mapping code is: http://lxr.mozilla.org/seamonkey/source/widget/src/gtk/nsGtkEventHandler.cpp#168 http://lxr.mozilla.org/seamonkey/source/widget/src/gtk/nsGtkEventHandler.cpp#185 http://lxr.mozilla.org/seamonkey/source/widget/src/gtk/nsGtkEventHandler.cpp#209 If we can not distinguish keypad minus from regular minus, how can we implement the feature described in this bug?
I want to take this bug...
Assignee: hewitt → kyle.yuan
*** Bug 146726 has been marked as a duplicate of this bug. ***
(see comment 1) Summary: "history tree" should be replaced by "XUL trees".
See my bug 147348 comment 7 (and 5), for confirmation on Mozilla v1.3b/W2K (and v1.2b/W95). There has been nearly no activity for 9 months: any chance to have some for v1.a ?
Of course, I meant "v1.4a" in my previous comment :->
Serge, the fix for this bug is quite simple, but bug 153344 and bug 154207 block us, nobody wants to take a big risk for this minor UI enhancement :(
[Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.4a) Gecko/20030401] Bug still there.
*** Bug 216425 has been marked as a duplicate of this bug. ***
*** Bug 187202 has been marked as a duplicate of this bug. ***
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: shrir → xptoolkit.widgets
Summary: Plus/Minus keys won't expand/contract branches in history tree → Plus/Minus keys on numeric keypad won't expand/contract branches in trees
You need to log in before you can comment on or make changes to this bug.