Closed Bug 26484 Opened 20 years ago Closed 20 years ago

XUL Key Bindings and XBL Bindings should not support key

Categories

(Core :: XUL, defect, P3)

defect

Tracking

()

VERIFIED DUPLICATE of bug 27832

People

(Reporter: hangas, Assigned: hangas)

References

Details

(Whiteboard: [PDT+] 2/14 Estimated Fix)

Key bindings created for keys like "N" do not work.  I do not want control/
command N, I just want N to be the key binding for Next Unread Message in mail.  
If I create (on Mac) the binding with:

<broadcaster id="cmd_nextUnreadMsg" oncommand="MsgNextUnreadMessage();"/>
<key id="key_nextUnreadMsg" key="&nextUnreadMsgCmd.key;" observes=
"cmd_NextUnreadMsg"/>
<menuitem value="&nextUnreadMsgCmd.label;" key="key_nextUnreadMsg" observes=
"cmd_nextUnreadMsg"/>

The N shows up in the menu but it does not do anything when I enter N or shift-N.  
The menu item still functions correctly.
Blocks: 22558
Marking M15, feel free to disagree
Status: NEW → ASSIGNED
Target Milestone: M15
Nominating for beta1 since 22558 has been marked beta1/pdt+, we cannot fix that 
bug unless this one is fixed.  Bumping to M14 - sorry Chris.
Keywords: beta1
Target Milestone: M15 → M14
Marking this PDT+. This is a common usage in mail.
Whiteboard: [PDT+]
akkana, if you to help, this would be a good bug to look at! Please? :-)
If bug 24645 includes the mail window, then this bug is dependant on that one
and fixing the problem in the xul keybindings will have no effect on the actual
window.

I will check with Hyatt regarding 24645, to figure out whether we need to fix
this bug in the xul keybindings, or just in XBL (if, indeed, it happens in XBL,
and I'll also check on that).
Turns out that XBL bindings DO work with no modifier key specified; they also
insert the character as well as doing their xbl action, but the double-event
problem is well known and covered by other bugs.

But Hyatt says he doesn't plan to convert the mail window over to XBL, that
windows like that are better done with XUL keybindings so that the menus can
automatically pick up the accelerators.

I'll take this, at least to take a look.
Assignee: saari → akkana
Status: ASSIGNED → NEW
Are you sure they don't work?  I tried setting the following binding in
platformEditorBindings.xul (for Unix):

<key id="emDelCharFWkb" key="x" 
  onkeypress="
    var controller =
document.commandDispatcher.getControllerForCommand('cmd_deleteCharForward');
    controller.doCommand('cmd_deleteCharForward');"/>

and it worked -- when I typed x, it deleted the next character.  (It also
inserted an x, the double-event problem rearing its ugly head yet again.)

Where are the mail/news bindings, so I can try this in the mail window and see
why it's not working there?  I don't see anything that looks like mail/news in
xpfe/global/resources/content/*Bindings.xul where all the other XUL bindings
are.
Status: NEW → ASSIGNED
Marking worksforme since I haven't heard anything and haven't been able to reach
the submitter by phone.  If you're still seeing it, please reopen with
information on where the mail keybinding file is so I can try the key binding
you gave here.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
dfdsfsdf
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
dfskjd;ghds;fgljkrepoft
Assignee: akkana → hyatt
Status: REOPENED → NEW
There was a bug in the key listener.  I have a fix in my tree.
Status: NEW → ASSIGNED
This is worse than originally thought.  The only way we're going to be able to 
fix this is if we alter all key bindings in the product to force them to use 
keycode and charcode explicitly (instead of just key, which we need to 
deprecate).
Summary: key bindings without xulkey= do not work → XUL Key Bindings and XBL Bindings should not support key
Whiteboard: [PDT+] → [PDT+] 2/14 Estimated Fix
Taking bug...working on fix with saari on my machine.
Assignee: hyatt → hangas
Status: ASSIGNED → NEW
Saari and I seemed to have this fixed.  With a little more digging, we solved the 
problem.  Key bindings now work without xulkey="true".  Fix checked in.
Status: NEW → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
Ok, good.  Then my other bug need not be PDT+.
sending to lchiang to verify in the mail case, I actually don't see this
working, but maybe N to Next Unread Message is not hooked up.
QA Contact: paulmac → lchiang
QA Contact: lchiang → fenella
Reopen, because this bug is not fixed.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Mark as dup of real bug - 27832


*** This bug has been marked as a duplicate of 27832 ***
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → DUPLICATE
Mark it a verified/dup.
Status: RESOLVED → VERIFIED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: fenella → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.