mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
57078: Eliminate bogus xul bindings which were conflicting with XBL bindings.
Clean up XBL bindings and eliminate redundancies and errors. Fix a bug in which XBL bindings didn't check for event cancellation. r=brade sr=hyatt
This commit is contained in:
parent
5b5a295f90
commit
9c4ab7672b
@ -3,72 +3,4 @@
|
||||
|
||||
<window id="browserBindings"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<keyset id="browserKeySet">
|
||||
<key id="key_page_up" keycode="VK_PAGE_UP"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_scrollPageUp');
|
||||
controller.doCommand('cmd_scrollPageUp');"/>
|
||||
<key id="key_page_down" keycode="VK_PAGE_DOWN"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_scrollPageDown');
|
||||
controller.doCommand('cmd_scrollPageDown');"/>
|
||||
<key id="space" key=" "
|
||||
oncommand="
|
||||
var v = document.commandDispatcher.focusedElement;
|
||||
|
||||
if (v && (v.localName == 'INPUT' || v.localName == 'TEXTAREA')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_scrollPageDown');
|
||||
controller.doCommand('cmd_scrollPageDown');
|
||||
"/>
|
||||
|
||||
<key id="key_page_up" keycode="VK_UP"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_scrollLineUp');
|
||||
controller.doCommand('cmd_scrollLineUp');"/>
|
||||
<key id="key_page_down" keycode="VK_DOWN"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_scrollLineDown');
|
||||
controller.doCommand('cmd_scrollLineDown');"/>
|
||||
<key id="key_left" keycode="VK_LEFT"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_scrollLeft');
|
||||
controller.doCommand('cmd_scrollLeft');"/>
|
||||
<key id="key_right" keycode="VK_RIGHT"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_scrollRight');
|
||||
controller.doCommand('cmd_scrollRight');"/>
|
||||
|
||||
<key id="cutKey" key="x"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_cut');
|
||||
controller.doCommand('cmd_cut');" modifiers="accel"/>
|
||||
<key id="copyKey" key="c"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_copy');
|
||||
controller.doCommand('cmd_copy');" modifiers="accel"/>
|
||||
<key id="pasteKey" key="v"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_paste');
|
||||
controller.doCommand('cmd_paste');" modifiers="accel"/>
|
||||
<key id="undoKey" key="z"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_undo');
|
||||
controller.doCommand('cmd_undo');" modifiers="accel"/>
|
||||
<key id="redoKey" key="y"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_redo');
|
||||
controller.doCommand('cmd_redo');" modifiers="accel"/>
|
||||
|
||||
</keyset>
|
||||
</window>
|
||||
|
@ -3,110 +3,4 @@
|
||||
<window id="editorBindings"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<keyset id="editorKeySet">
|
||||
<key id="key_home" keycode="VK_HOME"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_beginLine');
|
||||
controller.doCommand('cmd_beginLine');"/>
|
||||
<key id="key_end" keycode="VK_END"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_endLine');
|
||||
controller.doCommand('cmd_endLine');"/>
|
||||
<key id="key_left" keycode="VK_LEFT"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_charPrevious');
|
||||
controller.doCommand('cmd_charPrevious');"/>
|
||||
<key id="key_right" keycode="VK_RIGHT"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_charNext');
|
||||
controller.doCommand('cmd_charNext');"/>
|
||||
<key id="key_homeshift" keycode="VK_HOME"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_selectBeginLine');
|
||||
controller.doCommand('cmd_selectBeginLine');" modifiers="shift"/>
|
||||
<key id="key_endshift" keycode="VK_END"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_selectEndLine');
|
||||
controller.doCommand('cmd_selectEndLine');" modifiers="shift"/>
|
||||
<key id="key_leftshift" keycode="VK_LEFT"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_selectCharPrevious');
|
||||
controller.doCommand('cmd_selectCharPrevious');" modifiers="shift"/>
|
||||
<key id="key_rightshift" keycode="VK_RIGHT"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_selectCharNext');
|
||||
controller.doCommand('cmd_selectCharNext');" modifiers="shift"/>
|
||||
<key id="key_pageup" keycode="VK_PAGE_UP"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_scrollPageUp');
|
||||
controller.doCommand('cmd_scrollPageUp');"/>
|
||||
<key id="key_pagedown" keycode="VK_PAGE_DOWN"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_scrollPageDown');
|
||||
controller.doCommand('cmd_scrollPageDown');"/>
|
||||
<key id="key_left" keycode="VK_UP"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_linePrevious');
|
||||
controller.doCommand('cmd_linePrevious');"/>
|
||||
<key id="key_right" keycode="VK_DOWN"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_lineNext');
|
||||
controller.doCommand('cmd_lineNext');"/>
|
||||
<key id="key_left_shift" keycode="VK_UP"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_selectLinePrevious');
|
||||
controller.doCommand('cmd_selectLinePrevious');" modifiers="shift"/>
|
||||
<key id="key_right_shift" keycode="VK_DOWN"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_selectLineNext');
|
||||
controller.doCommand('cmd_selectLineNext');" modifiers="shift"/>
|
||||
<key id="key_undo" key="z"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_undo');
|
||||
controller.doCommand('cmd_undo');" modifiers="accel"/>
|
||||
<key id="key_redo" key="y"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_redo');
|
||||
controller.doCommand('cmd_redo');" modifiers="accel"/>
|
||||
<key id="key_space" key=" " cancel="true"/>
|
||||
|
||||
<!-- cut, copy, paste, undo and redo keys -->
|
||||
<key id="edCutKey" key="x"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_cut');
|
||||
controller.doCommand('cmd_cut');" modifiers="accel"/>
|
||||
<key id="edCopyKey" key="c"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_copy');
|
||||
controller.doCommand('cmd_copy');" modifiers="accel"/>
|
||||
<key id="edPasteKey" key="v"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_paste');
|
||||
controller.doCommand('cmd_paste');" modifiers="accel"/>
|
||||
<key id="edUndoKey" key="z"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_undo');
|
||||
controller.doCommand('cmd_undo');" modifiers="accel"/>
|
||||
<key id="edRedoKey" key="r"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_redo');
|
||||
controller.doCommand('cmd_redo');" modifiers="accel"/>
|
||||
|
||||
</keyset>
|
||||
</window>
|
||||
|
@ -1,45 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- unix version of platformBrowserBindings.xul -->
|
||||
|
||||
<!-- This file is ONLY here to show bindings in the menus. -->
|
||||
<!-- The real bindings come from XBL, in platformHTMLBindings.xml -->
|
||||
<!-- See bugs 57078 and 71779. -->
|
||||
|
||||
<keybinding id="platformBrowserBindings"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<keyset id="globalKeySet">
|
||||
|
||||
<!-- other keybindings for cut/copy/paste -->
|
||||
<key id="winAlternativeCutKey" keycode="VK_DELETE"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_cut');
|
||||
controller.doCommand('cmd_cut');" modifiers="shift"/>
|
||||
|
||||
<key id="winAlternativeCopy2Key" keycode="VK_DELETE"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_copy');
|
||||
controller.doCommand('cmd_copy');" modifiers="control"/>
|
||||
|
||||
<key id="winAlternativeCopyKey" keycode="VK_INSERT"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_copy');
|
||||
controller.doCommand('cmd_copy');" modifiers="control"/>
|
||||
|
||||
<key id="winAlternativePasteKey" keycode="VK_INSERT"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_paste');
|
||||
controller.doCommand('cmd_paste');" modifiers="shift"/>
|
||||
|
||||
|
||||
<key id="key_homectrlshift" keycode="VK_HOME"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_selectTop');
|
||||
controller.doCommand('cmd_selectTop');" modifiers="shift, control"/>
|
||||
<key id="key_endctrlshift" keycode="VK_END"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_selectBottom');
|
||||
controller.doCommand('cmd_selectBottom');" modifiers="shift, control"/>
|
||||
|
||||
<key id="sparcCutKey" keycode="VK_F20"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_cut');
|
||||
|
@ -1,128 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- unix version of platformEditorBindings.xul -->
|
||||
<!-- This file is ONLY here to show bindings in the menus. -->
|
||||
<!-- The real bindings come from XBL, in platformHTMLBindings.xml -->
|
||||
<!-- See bugs 57078 and 71779. -->
|
||||
|
||||
<keybinding id="platformEditorBindings"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<keyset id="editorKeySet">
|
||||
|
||||
<!-- emacs delete keys -->
|
||||
<key id="emDelCharBWkb" key="h"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_deleteCharBackward');
|
||||
controller.doCommand('cmd_deleteCharBackward');" modifiers="control"/>
|
||||
<key id="emDelCharFWkb" key="d"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_deleteCharForward');
|
||||
controller.doCommand('cmd_deleteCharForward');" modifiers="control"/>
|
||||
<key id="emKillToEndkb" key="k"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_deleteToEndOfLine');
|
||||
controller.doCommand('cmd_deleteToEndOfLine');" modifiers="control"/>
|
||||
<key id="emKillToBegkb" key="u"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_deleteToBeginningOfLine');
|
||||
controller.doCommand('cmd_deleteToBeginningOfLine');" modifiers="control"/>
|
||||
|
||||
<!-- emacs motion keys: these use the selection controller API -->
|
||||
<key id="emBeginLinekb" key="a"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_beginLine');
|
||||
controller.doCommand('cmd_beginLine');" modifiers="control"/>
|
||||
<key id="emEndLinekb" key="e"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_endLine');
|
||||
controller.doCommand('cmd_endLine');" modifiers="control"/>
|
||||
<key id="emCharPrevkb" key="b"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_charPrevious');
|
||||
controller.doCommand('cmd_charPrevious');" modifiers="control"/>
|
||||
<key id="emCharNextkb" key="f"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_charNext');
|
||||
controller.doCommand('cmd_charNext');" modifiers="control"/>
|
||||
<key id="emPrevLinekb" key="p"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_linePrevious');
|
||||
controller.doCommand('cmd_linePrevious');" modifiers="control"/>
|
||||
<key id="emNextLinekb" key="n"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_lineNext');
|
||||
controller.doCommand('cmd_lineNext');" modifiers="control"/>
|
||||
|
||||
<!-- Add the Windows/Mac cut, copy, paste, undo and redo keys -->
|
||||
<key id="emCutKey" key="x"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_cut');
|
||||
controller.doCommand('cmd_cut');" modifiers="control"/>
|
||||
<key id="emCopyKey" key="c"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_copy');
|
||||
controller.doCommand('cmd_copy');" modifiers="control"/>
|
||||
<key id="emPasteKey" key="v"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_paste');
|
||||
controller.doCommand('cmd_paste');" modifiers="control"/>
|
||||
<key id="emUndoKey" key="z"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_undo');
|
||||
controller.doCommand('cmd_undo');" modifiers="control"/>
|
||||
<key id="emRedoKey" key="r"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_redo');
|
||||
controller.doCommand('cmd_redo');" modifiers="control"/>
|
||||
|
||||
<key id="winAlternateCutKey" keycode="VK_DELETE"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_cut');
|
||||
controller.doCommand('cmd_cut');" modifiers="shift"/>
|
||||
|
||||
<key id="winAlternateCopy2Key" keycode="VK_DELETE"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_copy');
|
||||
controller.doCommand('cmd_copy');" modifiers="control"/>
|
||||
|
||||
<key id="winAlternateCopyKey" keycode="VK_INSERT"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_copy');
|
||||
controller.doCommand('cmd_copy');" modifiers="control"/>
|
||||
<key id="winAlternatePasteKey" keycode="VK_INSERT"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_paste');
|
||||
controller.doCommand('cmd_paste');" modifiers="shift"/>
|
||||
|
||||
<key id="key_leftcontrol" keycode="VK_LEFT"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_wordPrevious');
|
||||
controller.doCommand('cmd_wordPrevious');" modifiers="control"/>
|
||||
<key id="key_rightcontrol" keycode="VK_RIGHT"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_wordNext');
|
||||
controller.doCommand('cmd_wordNext');" modifiers="control"/>
|
||||
<key id="key_leftshiftcontrol" keycode="VK_LEFT"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_selectWordPrevious');
|
||||
controller.doCommand('cmd_selectWordPrevious');" modifiers="shift, control"/>
|
||||
<key id="key_rightshiftcontrol" keycode="VK_RIGHT"
|
||||
oncommand="
|
||||
var controller = document.commandDispatcher.getControllerForCommand('cmd_selectWordNext');
|
||||
controller.doCommand('cmd_selectWordNext');" modifiers="shift, control"/>
|
||||
|
||||
|
||||
<key id="key_homectrlshift" keycode="VK_HOME"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_selectTop');
|
||||
controller.doCommand('cmd_selectTop');" modifiers="shift, control"/>
|
||||
<key id="key_endctrlshift" keycode="VK_END"
|
||||
oncommand="
|
||||
var controller =
|
||||
document.commandDispatcher.getControllerForCommand('cmd_selectBottom');
|
||||
controller.doCommand('cmd_selectBottom');" modifiers="shift, control"/>
|
||||
|
||||
</keyset>
|
||||
|
||||
<!-- End Unix-specific keybindings -->
|
||||
|
||||
</keybinding>
|
||||
|
@ -25,8 +25,6 @@
|
||||
<statusbarpanel id="offline-status" tooltip="aTooltip" observes="Communicator:WorkMode"/>
|
||||
<menuitem id="offlineGoOfflineCmd" accesskey="&offlineGoOfflineCmd.accesskey;" observes="Communicator:WorkMode"/>
|
||||
|
||||
|
||||
|
||||
<!-- File Menu -->
|
||||
<menu id="menu_File" value="&fileMenu.label;" accesskey="&fileMenu.accesskey;"/>
|
||||
|
||||
@ -58,12 +56,15 @@
|
||||
<menuitem id="menu_delete" value="&deleteCmd.label;" key="key_delete" accesskey="&deleteCmd.accesskey;" observes="cmd_delete"/>
|
||||
<menuitem id="menu_selectAll" value="&selectAllCmd.label;" key="key_selectAll" accesskey="&selectAllCmd.accesskey;" observes="cmd_selectAll"/>
|
||||
|
||||
<key id="key_undo" key="&undoCmd.key;" observes="cmd_undo" modifiers="accel"/>
|
||||
<key id="key_redo" key="&redoCmd.key;" observes="cmd_redo" modifiers="accel"/>
|
||||
<key id="key_cut" key="&cutCmd.key;" observes="cmd_cut" modifiers="accel"/>
|
||||
<key id="key_copy" key="©Cmd.key;" observes="cmd_copy" modifiers="accel"/>
|
||||
<key id="key_paste" key="&pasteCmd.key;" observes="cmd_paste" modifiers="accel"/>
|
||||
<key id="key_selectAll" key="&selectAllCmd.key;" observes="cmd_selectAll" modifiers="accel"/>
|
||||
<!-- These key nodes are here only for show. -->
|
||||
<!-- The real bindings come from XBL, in platformHTMLBindings.xml. -->
|
||||
<!-- See bugs 57078 and 71779. -->
|
||||
<key id="key_undo" key="&undoCmd.key;" modifiers="accel"/>
|
||||
<key id="key_redo" key="&redoCmd.key;" modifiers="accel"/>
|
||||
<key id="key_cut" key="&cutCmd.key;" modifiers="accel"/>
|
||||
<key id="key_copy" key="©Cmd.key;" modifiers="accel"/>
|
||||
<key id="key_paste" key="&pasteCmd.key;" modifiers="accel"/>
|
||||
<key id="key_selectAll" key="&selectAllCmd.key;" modifiers="accel"/>
|
||||
|
||||
<commandset id="globalEditMenuItems"
|
||||
commandupdater="true"
|
||||
|
Loading…
Reference in New Issue
Block a user