diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/xbl/builtin | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/xbl/builtin')
-rw-r--r-- | dom/xbl/builtin/android/jar.mn | 6 | ||||
-rw-r--r-- | dom/xbl/builtin/android/moz.build | 7 | ||||
-rw-r--r-- | dom/xbl/builtin/android/platformHTMLBindings.xml | 162 | ||||
-rw-r--r-- | dom/xbl/builtin/browser-base.inc | 14 | ||||
-rw-r--r-- | dom/xbl/builtin/editor-base.inc | 19 | ||||
-rw-r--r-- | dom/xbl/builtin/emacs/jar.mn | 6 | ||||
-rw-r--r-- | dom/xbl/builtin/emacs/moz.build | 7 | ||||
-rw-r--r-- | dom/xbl/builtin/emacs/platformHTMLBindings.xml | 237 | ||||
-rw-r--r-- | dom/xbl/builtin/input-fields-base.inc | 17 | ||||
-rw-r--r-- | dom/xbl/builtin/mac/jar.mn | 6 | ||||
-rw-r--r-- | dom/xbl/builtin/mac/moz.build | 7 | ||||
-rw-r--r-- | dom/xbl/builtin/mac/platformHTMLBindings.xml | 72 | ||||
-rw-r--r-- | dom/xbl/builtin/moz.build | 17 | ||||
-rw-r--r-- | dom/xbl/builtin/textareas-base.inc | 16 | ||||
-rw-r--r-- | dom/xbl/builtin/unix/jar.mn | 6 | ||||
-rw-r--r-- | dom/xbl/builtin/unix/moz.build | 7 | ||||
-rw-r--r-- | dom/xbl/builtin/unix/platformHTMLBindings.xml | 82 | ||||
-rw-r--r-- | dom/xbl/builtin/win/jar.mn | 6 | ||||
-rw-r--r-- | dom/xbl/builtin/win/moz.build | 7 | ||||
-rw-r--r-- | dom/xbl/builtin/win/platformHTMLBindings.xml | 164 |
20 files changed, 865 insertions, 0 deletions
diff --git a/dom/xbl/builtin/android/jar.mn b/dom/xbl/builtin/android/jar.mn new file mode 100644 index 000000000..9f05c2dd6 --- /dev/null +++ b/dom/xbl/builtin/android/jar.mn @@ -0,0 +1,6 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +toolkit.jar: +* content/global/platformHTMLBindings.xml (platformHTMLBindings.xml) diff --git a/dom/xbl/builtin/android/moz.build b/dom/xbl/builtin/android/moz.build new file mode 100644 index 000000000..eb4454d28 --- /dev/null +++ b/dom/xbl/builtin/android/moz.build @@ -0,0 +1,7 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file diff --git a/dom/xbl/builtin/android/platformHTMLBindings.xml b/dom/xbl/builtin/android/platformHTMLBindings.xml new file mode 100644 index 000000000..03363c1b5 --- /dev/null +++ b/dom/xbl/builtin/android/platformHTMLBindings.xml @@ -0,0 +1,162 @@ +<?xml version="1.0"?> +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + + +<bindings id="htmlBindings" + xmlns="http://www.mozilla.org/xbl" + xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + + <binding id="inputFields" bindToUntrustedContent="true"> + <handlers> +#include ../input-fields-base.inc + <handler event="keypress" key="a" modifiers="accel" command="cmd_selectAll"/> + + <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_wordPrevious"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_wordNext"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control" command="cmd_selectWordPrevious"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control" command="cmd_selectWordNext"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="alt" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="alt" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift,alt" command="cmd_selectBeginLine"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,alt" command="cmd_selectEndLine"/> + + <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine" /> + <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine" /> + + <handler event="keypress" keycode="VK_BACK" modifiers="alt" command="cmd_deleteToBeginningOfLine"/> + <handler event="keypress" keycode="VK_DELETE" modifiers="alt" command="cmd_deleteToEndOfLine"/> + </handlers> + </binding> + + <binding id="textAreas" bindToUntrustedContent="true"> + <handlers> +#include ../textareas-base.inc + <handler event="keypress" key="a" modifiers="accel" command="cmd_selectAll"/> + + <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_wordPrevious"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_wordNext"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control" command="cmd_selectWordPrevious"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control" command="cmd_selectWordNext"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="alt" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="alt" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift,alt" command="cmd_selectBeginLine"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,alt" command="cmd_selectEndLine"/> + + <handler event="keypress" keycode="VK_UP" modifiers="alt" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="alt" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_UP" modifiers="shift,alt" command="cmd_selectTop"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift,alt" command="cmd_selectBottom"/> + + <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="alt" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="alt" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift,alt" command="cmd_selectTop"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift,alt" command="cmd_selectBottom"/> + + <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine" /> + <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine" /> + <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop" /> + <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom" /> + + <handler event="keypress" keycode="VK_BACK" modifiers="alt" command="cmd_deleteToBeginningOfLine"/> + <handler event="keypress" keycode="VK_DELETE" modifiers="alt" command="cmd_deleteToEndOfLine"/> + </handlers> + </binding> + + <binding id="browser"> + <handlers> +#include ../browser-base.inc + <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectCharPrevious" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectCharNext" /> + <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_wordPrevious" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_wordNext" /> + <handler event="keypress" keycode="VK_LEFT" modifiers="control,shift" command="cmd_selectWordPrevious" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control,shift" command="cmd_selectWordNext" /> + <handler event="keypress" keycode="VK_LEFT" modifiers="alt" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="alt" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift,alt" command="cmd_selectBeginLine"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,alt" command="cmd_selectEndLine"/> + + <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectLinePrevious" /> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectLineNext" /> + <handler event="keypress" keycode="VK_UP" modifiers="alt" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="alt" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_UP" modifiers="shift,alt" command="cmd_selectTop"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift,alt" command="cmd_selectBottom"/> + + <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="alt" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="alt" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift,alt" command="cmd_selectTop"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift,alt" command="cmd_selectBottom"/> + + <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine" /> + <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine" /> + <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop" /> + <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom" /> + + <handler event="keypress" keycode="VK_BACK" modifiers="alt" command="cmd_deleteToBeginningOfLine"/> + <handler event="keypress" keycode="VK_DELETE" modifiers="alt" command="cmd_deleteToEndOfLine"/> + </handlers> + </binding> + + <binding id="editor"> + <handlers> +#include ../editor-base.inc + <handler event="keypress" key="a" modifiers="accel" command="cmd_selectAll"/> + + <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_wordPrevious"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_wordNext"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control" command="cmd_selectWordPrevious"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control" command="cmd_selectWordNext"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="alt" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="alt" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift,alt" command="cmd_selectBeginLine"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,alt" command="cmd_selectEndLine"/> + + <handler event="keypress" keycode="VK_UP" modifiers="alt" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="alt" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_UP" modifiers="shift,alt" command="cmd_selectTop"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift,alt" command="cmd_selectBottom"/> + + <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="alt" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="alt" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift,alt" command="cmd_selectTop"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift,alt" command="cmd_selectBottom"/> + + <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine" /> + <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine" /> + <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop" /> + <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom" /> + + <handler event="keypress" keycode="VK_BACK" modifiers="alt" command="cmd_deleteToBeginningOfLine"/> + <handler event="keypress" keycode="VK_DELETE" modifiers="alt" command="cmd_deleteToEndOfLine"/> + </handlers> + </binding> +</bindings> diff --git a/dom/xbl/builtin/browser-base.inc b/dom/xbl/builtin/browser-base.inc new file mode 100644 index 000000000..03264c270 --- /dev/null +++ b/dom/xbl/builtin/browser-base.inc @@ -0,0 +1,14 @@ + <handler event="keypress" key=" " modifiers="shift" command="cmd_scrollPageUp" /> + <handler event="keypress" key=" " command="cmd_scrollPageDown" /> + + <handler event="keypress" keycode="VK_UP" command="cmd_moveUp" /> + <handler event="keypress" keycode="VK_DOWN" command="cmd_moveDown" /> + <handler event="keypress" keycode="VK_LEFT" command="cmd_moveLeft" /> + <handler event="keypress" keycode="VK_RIGHT" command="cmd_moveRight" /> + + <handler event="keypress" key="x" command="cmd_cut" modifiers="accel"/> + <handler event="keypress" key="c" command="cmd_copy" modifiers="accel"/> + <handler event="keypress" key="v" command="cmd_paste" modifiers="accel"/> + <handler event="keypress" key="z" command="cmd_undo" modifiers="accel"/> + <handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" /> + <handler event="keypress" key="a" command="cmd_selectAll" modifiers="accel"/> diff --git a/dom/xbl/builtin/editor-base.inc b/dom/xbl/builtin/editor-base.inc new file mode 100644 index 000000000..1084da814 --- /dev/null +++ b/dom/xbl/builtin/editor-base.inc @@ -0,0 +1,19 @@ + <handler event="keypress" key=" " modifiers="shift" command="cmd_scrollPageUp" /> + <handler event="keypress" key=" " command="cmd_scrollPageDown" /> + + <handler event="keypress" keycode="VK_LEFT" command="cmd_moveLeft"/> + <handler event="keypress" keycode="VK_RIGHT" command="cmd_moveRight"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectLeft"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectRight"/> + + <handler event="keypress" keycode="VK_UP" command="cmd_moveUp"/> + <handler event="keypress" keycode="VK_DOWN" command="cmd_moveDown"/> + <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectUp"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectDown"/> + + <handler event="keypress" key="z" command="cmd_undo" modifiers="accel"/> + <handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" /> + <handler event="keypress" key="x" command="cmd_cut" modifiers="accel"/> + <handler event="keypress" key="c" command="cmd_copy" modifiers="accel"/> + <handler event="keypress" key="v" command="cmd_paste" modifiers="accel"/> + <handler event="keypress" key="v" command="cmd_pasteNoFormatting" modifiers="accel,shift"/> diff --git a/dom/xbl/builtin/emacs/jar.mn b/dom/xbl/builtin/emacs/jar.mn new file mode 100644 index 000000000..9f05c2dd6 --- /dev/null +++ b/dom/xbl/builtin/emacs/jar.mn @@ -0,0 +1,6 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +toolkit.jar: +* content/global/platformHTMLBindings.xml (platformHTMLBindings.xml) diff --git a/dom/xbl/builtin/emacs/moz.build b/dom/xbl/builtin/emacs/moz.build new file mode 100644 index 000000000..eb4454d28 --- /dev/null +++ b/dom/xbl/builtin/emacs/moz.build @@ -0,0 +1,7 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file diff --git a/dom/xbl/builtin/emacs/platformHTMLBindings.xml b/dom/xbl/builtin/emacs/platformHTMLBindings.xml new file mode 100644 index 000000000..76c214ffa --- /dev/null +++ b/dom/xbl/builtin/emacs/platformHTMLBindings.xml @@ -0,0 +1,237 @@ +<?xml version="1.0"?> +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + + +<bindings id="htmlBindings" + xmlns="http://www.mozilla.org/xbl" + xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + + <binding id="inputFields" bindToUntrustedContent="true"> + <handlers> +#include ../input-fields-base.inc + <!-- Emacsish single-line motion and delete keys --> + <handler event="keypress" key="a" modifiers="control" + command="cmd_beginLine"/> + <handler event="keypress" key="e" modifiers="control" + command="cmd_endLine"/> + <handler event="keypress" key="b" modifiers="control" + command="cmd_charPrevious"/> + <handler event="keypress" key="f" modifiers="control" + command="cmd_charNext"/> + <handler event="keypress" key="h" modifiers="control" + command="cmd_deleteCharBackward"/> + <handler event="keypress" key="d" modifiers="control" + command="cmd_deleteCharForward"/> + <handler event="keypress" key="w" modifiers="control" + command="cmd_deleteWordBackward"/> + <handler event="keypress" key="u" modifiers="control" + command="cmd_deleteToBeginningOfLine"/> + <handler event="keypress" key="k" modifiers="control" + command="cmd_deleteToEndOfLine"/> + + <!-- Alternate Windows copy/paste/undo/redo keys --> + <handler event="keypress" keycode="VK_DELETE" modifiers="shift" + command="cmd_cutOrDelete"/> + <handler event="keypress" keycode="VK_DELETE" modifiers="control" + command="cmd_copyOrDelete"/> + <handler event="keypress" keycode="VK_INSERT" modifiers="control" + command="cmd_copy"/> + <handler event="keypress" keycode="VK_INSERT" modifiers="shift" + command="cmd_paste"/> + + <!-- navigating by word keys --> + <handler event="keypress" keycode="VK_HOME" + command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" + command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift" + command="cmd_selectBeginLine"/> + <handler event="keypress" keycode="VK_END" modifiers="shift" + command="cmd_selectEndLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="control" + command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" modifiers="control" + command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="control,shift" + command="cmd_selectBeginLine"/> + <handler event="keypress" keycode="VK_END" modifiers="control,shift" + command="cmd_selectEndLine"/> + <handler event="keypress" keycode="VK_BACK" modifiers="control" + command="cmd_deleteWordBackward"/> + + <handler event="keypress" keycode="VK_LEFT" modifiers="control" + command="cmd_wordPrevious"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control" + command="cmd_wordNext"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control" + command="cmd_selectWordPrevious"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control" + command="cmd_selectWordNext"/> + <handler event="keypress" key="y" modifiers="accel" + command="cmd_redo"/> + <handler event="keypress" key="a" modifiers="alt" + command="cmd_selectAll"/> + </handlers> + </binding> + + <binding id="textAreas" bindToUntrustedContent="true"> + <handlers> +#include ../textareas-base.inc + <!-- Emacsish single-line motion and delete keys --> + <handler event="keypress" key="a" modifiers="control" + command="cmd_beginLine"/> + <handler event="keypress" key="e" modifiers="control" + command="cmd_endLine"/> + <handler event="keypress" id="key_left" key="b" modifiers="control" + command="cmd_charPrevious"/> + <handler event="keypress" id="key_right" key="f" modifiers="control" + command="cmd_charNext"/> + <handler event="keypress" id="key_delback" key="h" modifiers="control" + command="cmd_deleteCharBackward"/> + <handler event="keypress" id="key_delforw" key="d" modifiers="control" + command="cmd_deleteCharForward"/> + <handler event="keypress" id="key_delwback" key="w" modifiers="control" + command="cmd_deleteWordBackward"/> + <handler event="keypress" id="key_del_bol" key="u" modifiers="control" + command="cmd_deleteToBeginningOfLine"/> + <handler event="keypress" id="key_del_eol" key="k" modifiers="control" + command="cmd_deleteToEndOfLine"/> + + <!-- Alternate Windows copy/paste/undo/redo keys --> + <handler event="keypress" keycode="VK_DELETE" modifiers="shift" + command="cmd_cutOrDelete"/> + <handler event="keypress" keycode="VK_DELETE" modifiers="control" + command="cmd_copyOrDelete"/> + <handler event="keypress" keycode="VK_INSERT" modifiers="control" + command="cmd_copy"/> + <handler event="keypress" keycode="VK_INSERT" modifiers="shift" + command="cmd_paste"/> + + <!-- Emacsish multi-line motion and delete keys --> + <handler event="keypress" id="key_linedown" key="n" modifiers="control" + command="cmd_lineNext"/> + <handler event="keypress" id="key_lineup" key="p" modifiers="control" + command="cmd_linePrevious"/> + + <!-- handle home/end/arrow keys and redo --> + <handler event="keypress" keycode="VK_HOME" + command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" + command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift" + command="cmd_selectBeginLine"/> + <handler event="keypress" keycode="VK_END" modifiers="shift" + command="cmd_selectEndLine"/> + + <handler event="keypress" keycode="VK_HOME" modifiers="control" + command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_END" modifiers="control" + command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" + command="cmd_selectTop"/> + <handler event="keypress" keycode="VK_END" modifiers="shift,control" + command="cmd_selectBottom"/> + + <handler event="keypress" keycode="VK_PAGE_UP" + command="cmd_movePageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" + command="cmd_movePageDown"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" + command="cmd_selectPageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" + command="cmd_selectPageDown"/> + + <handler event="keypress" keycode="VK_LEFT" modifiers="control" + command="cmd_wordPrevious"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control" + command="cmd_wordNext"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control" + command="cmd_selectWordPrevious"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control" + command="cmd_selectWordNext"/> + <handler event="keypress" keycode="VK_BACK" modifiers="control" + command="cmd_deleteWordBackward"/> + <handler event="keypress" key="y" modifiers="accel" + command="cmd_redo"/> + <handler event="keypress" key="a" modifiers="alt" + command="cmd_selectAll"/> + </handlers> + </binding> + + <binding id="browser"> + <handlers> +#include ../browser-base.inc + <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/> + + <handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cut" /> + <handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_copy" /> + <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy" /> + <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop" /> + <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom" /> + + <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_wordPrevious" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_wordNext" /> + <handler event="keypress" keycode="VK_LEFT" modifiers="control,shift" command="cmd_selectWordPrevious" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control,shift" command="cmd_selectWordNext" /> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectCharPrevious" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectCharNext" /> + <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine" /> + <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine" /> + <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectLinePrevious" /> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectLineNext" /> + <handler event="keypress" key="a" modifiers="alt" command="cmd_selectAll"/> + </handlers> + </binding> + + <binding id="editor"> + <handlers> +#include ../editor-base.inc + <handler event="keypress" key="h" modifiers="control" command="cmd_deleteCharBackward"/> + <handler event="keypress" key="d" modifiers="control" command="cmd_deleteCharForward"/> + <handler event="keypress" key="k" modifiers="control" command="cmd_deleteToEndOfLine"/> + <handler event="keypress" key="u" modifiers="control" command="cmd_deleteToBeginningOfLine"/> + <handler event="keypress" key="a" modifiers="control" command="cmd_beginLine"/> + <handler event="keypress" key="e" modifiers="control" command="cmd_endLine"/> + <handler event="keypress" key="b" modifiers="control" command="cmd_charPrevious"/> + <handler event="keypress" key="f" modifiers="control" command="cmd_charNext"/> + <handler event="keypress" key="p" modifiers="control" command="cmd_linePrevious"/> + <handler event="keypress" key="n" modifiers="control" command="cmd_lineNext"/> + <handler event="keypress" key="x" modifiers="control" command="cmd_cut"/> + <handler event="keypress" key="c" modifiers="control" command="cmd_copy"/> + <handler event="keypress" key="v" modifiers="control" command="cmd_paste"/> + <handler event="keypress" key="z" modifiers="control" command="cmd_undo"/> + <handler event="keypress" key="y" modifiers="accel" command="cmd_redo"/> + <handler event="keypress" key="a" modifiers="alt" command="cmd_selectAll"/> + <handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cutOrDelete"/> + <handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_copyOrDelete"/> + <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy"/> + <handler event="keypress" keycode="VK_INSERT" modifiers="shift" command="cmd_paste"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_wordPrevious"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_wordNext"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control" command="cmd_selectWordPrevious"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control" command="cmd_selectWordNext"/> + <handler event="keypress" keycode="VK_BACK" modifiers="control" command="cmd_deleteWordBackward"/> + <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine"/> + <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop"/> + <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom"/> + <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/> + </handlers> + </binding> +</bindings> diff --git a/dom/xbl/builtin/input-fields-base.inc b/dom/xbl/builtin/input-fields-base.inc new file mode 100644 index 000000000..a19686291 --- /dev/null +++ b/dom/xbl/builtin/input-fields-base.inc @@ -0,0 +1,17 @@ + <handler event="keypress" keycode="VK_LEFT" command="cmd_moveLeft"/> + <handler event="keypress" keycode="VK_RIGHT" command="cmd_moveRight"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectLeft"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectRight"/> + + <handler event="keypress" keycode="VK_UP" command="cmd_moveUp"/> + <handler event="keypress" keycode="VK_DOWN" command="cmd_moveDown"/> + <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectUp"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectDown"/> + + <!-- Cut/copy/paste/undo --> + <handler event="keypress" key="c" modifiers="accel" command="cmd_copy"/> + <handler event="keypress" key="x" modifiers="accel" command="cmd_cut"/> + <handler event="keypress" key="v" modifiers="accel" command="cmd_paste"/> + <handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/> + <handler event="keypress" key="z" modifiers="accel,shift" command="cmd_redo" /> + diff --git a/dom/xbl/builtin/mac/jar.mn b/dom/xbl/builtin/mac/jar.mn new file mode 100644 index 000000000..9f05c2dd6 --- /dev/null +++ b/dom/xbl/builtin/mac/jar.mn @@ -0,0 +1,6 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +toolkit.jar: +* content/global/platformHTMLBindings.xml (platformHTMLBindings.xml) diff --git a/dom/xbl/builtin/mac/moz.build b/dom/xbl/builtin/mac/moz.build new file mode 100644 index 000000000..eb4454d28 --- /dev/null +++ b/dom/xbl/builtin/mac/moz.build @@ -0,0 +1,7 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file diff --git a/dom/xbl/builtin/mac/platformHTMLBindings.xml b/dom/xbl/builtin/mac/platformHTMLBindings.xml new file mode 100644 index 000000000..b70592399 --- /dev/null +++ b/dom/xbl/builtin/mac/platformHTMLBindings.xml @@ -0,0 +1,72 @@ +<?xml version="1.0"?> +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + + +<bindings id="htmlBindings" + xmlns="http://www.mozilla.org/xbl" + xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + + <binding id="inputFields" bindToUntrustedContent="true"> + <handlers> + <handler event="keypress" key="c" modifiers="accel" command="cmd_copy"/> + <handler event="keypress" key="x" modifiers="accel" command="cmd_cut"/> + <handler event="keypress" key="v" modifiers="accel" command="cmd_paste"/> + <handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/> + <handler event="keypress" key="z" modifiers="accel,shift" command="cmd_redo"/> + <handler event="keypress" key="a" modifiers="accel" command="cmd_selectAll"/> + </handlers> + </binding> + + <binding id="textAreas" bindToUntrustedContent="true"> + <handlers> + <handler event="keypress" key="c" modifiers="accel" command="cmd_copy"/> + <handler event="keypress" key="x" modifiers="accel" command="cmd_cut"/> + <handler event="keypress" key="v" modifiers="accel" command="cmd_paste"/> + <handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/> + <handler event="keypress" key="z" modifiers="accel,shift" command="cmd_redo"/> + <handler event="keypress" key="a" modifiers="accel" command="cmd_selectAll"/> + </handlers> + </binding> + + <binding id="browser"> + <handlers> +#include ../browser-base.inc + <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_scrollPageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_scrollPageDown"/> + <handler event="keypress" keycode="VK_HOME" command="cmd_scrollTop" /> + <handler event="keypress" keycode="VK_END" command="cmd_scrollBottom" /> + + <handler event="keypress" keycode="VK_LEFT" modifiers="alt" command="cmd_moveLeft2" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="alt" command="cmd_moveRight2" /> + <handler event="keypress" keycode="VK_LEFT" modifiers="alt,shift" command="cmd_selectLeft2" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="alt,shift" command="cmd_selectRight2" /> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectLeft" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectRight" /> + <handler event="keypress" keycode="VK_UP" modifiers="alt,shift" command="cmd_selectUp2" /> + <handler event="keypress" keycode="VK_DOWN" modifiers="alt,shift" command="cmd_selectDown2" /> + <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectUp" /> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectDown" /> + <handler event="keypress" keycode="VK_UP" modifiers="accel" command="cmd_moveUp2"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="accel" command="cmd_moveDown2"/> + </handlers> + </binding> + + <binding id="editor"> + <handlers> + <handler event="keypress" key=" " modifiers="shift" command="cmd_scrollPageUp" /> + <handler event="keypress" key=" " command="cmd_scrollPageDown" /> + + <handler event="keypress" key="z" command="cmd_undo" modifiers="accel"/> + <handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" /> + <handler event="keypress" key="x" command="cmd_cut" modifiers="accel"/> + <handler event="keypress" key="c" command="cmd_copy" modifiers="accel"/> + <handler event="keypress" key="v" command="cmd_paste" modifiers="accel"/> + <handler event="keypress" key="v" command="cmd_pasteNoFormatting" modifiers="accel,shift"/> + <handler event="keypress" key="a" command="cmd_selectAll" modifiers="accel"/> + <handler event="keypress" key="v" command="cmd_pasteNoFormatting" modifiers="accel,alt,shift"/> + </handlers> + </binding> + +</bindings> diff --git a/dom/xbl/builtin/moz.build b/dom/xbl/builtin/moz.build new file mode 100644 index 000000000..09574b363 --- /dev/null +++ b/dom/xbl/builtin/moz.build @@ -0,0 +1,17 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +if CONFIG['OS_ARCH'] == 'WINNT': + DIRS += ['win'] +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': + DIRS += ['mac'] +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': + DIRS += ['android'] +elif CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'): + DIRS += ['unix'] +else: + DIRS += ['emacs'] + diff --git a/dom/xbl/builtin/textareas-base.inc b/dom/xbl/builtin/textareas-base.inc new file mode 100644 index 000000000..7c52359d7 --- /dev/null +++ b/dom/xbl/builtin/textareas-base.inc @@ -0,0 +1,16 @@ + <handler event="keypress" keycode="VK_LEFT" command="cmd_moveLeft"/> + <handler event="keypress" keycode="VK_RIGHT" command="cmd_moveRight"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectLeft"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectRight"/> + + <handler event="keypress" keycode="VK_UP" command="cmd_moveUp"/> + <handler event="keypress" keycode="VK_DOWN" command="cmd_moveDown"/> + <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectUp"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectDown"/> + + <!-- Cut/copy/paste/undo --> + <handler event="keypress" key="c" modifiers="accel" command="cmd_copy"/> + <handler event="keypress" key="x" modifiers="accel" command="cmd_cut"/> + <handler event="keypress" key="v" modifiers="accel" command="cmd_paste"/> + <handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/> + <handler event="keypress" key="z" modifiers="accel,shift" command="cmd_redo" /> diff --git a/dom/xbl/builtin/unix/jar.mn b/dom/xbl/builtin/unix/jar.mn new file mode 100644 index 000000000..9f05c2dd6 --- /dev/null +++ b/dom/xbl/builtin/unix/jar.mn @@ -0,0 +1,6 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +toolkit.jar: +* content/global/platformHTMLBindings.xml (platformHTMLBindings.xml) diff --git a/dom/xbl/builtin/unix/moz.build b/dom/xbl/builtin/unix/moz.build new file mode 100644 index 000000000..eb4454d28 --- /dev/null +++ b/dom/xbl/builtin/unix/moz.build @@ -0,0 +1,7 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file diff --git a/dom/xbl/builtin/unix/platformHTMLBindings.xml b/dom/xbl/builtin/unix/platformHTMLBindings.xml new file mode 100644 index 000000000..75645f1f6 --- /dev/null +++ b/dom/xbl/builtin/unix/platformHTMLBindings.xml @@ -0,0 +1,82 @@ +<?xml version="1.0"?> +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + + +<bindings id="htmlBindings" + xmlns="http://www.mozilla.org/xbl" + xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + + <binding id="inputFields" bindToUntrustedContent="true"> + <handlers> +#include ../input-fields-base.inc + <handler event="keypress" key="a" modifiers="alt" + command="cmd_selectAll"/> + <handler event="keypress" key="y" modifiers="accel" + command="cmd_redo"/> + <handler event="keypress" key="z" modifiers="accel,shift" command="cmd_redo"/> + <handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/> + </handlers> + </binding> + + <binding id="textAreas" bindToUntrustedContent="true"> + <handlers> +#include ../textareas-base.inc + <handler event="keypress" key="a" modifiers="alt" + command="cmd_selectAll"/> + <handler event="keypress" key="y" modifiers="accel" + command="cmd_redo"/> + <handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/> + <handler event="keypress" key="z" modifiers="accel,shift" command="cmd_redo"/> + </handlers> + </binding> + + <binding id="browser"> + <handlers> +#include ../browser-base.inc + <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/> + + <handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cut" /> + <handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_copy" /> + <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy" /> + <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine" /> + <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine" /> + <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop" /> + <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom" /> + + <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectLeft" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectRight" /> + <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_moveLeft2" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_moveRight2" /> + <handler event="keypress" keycode="VK_LEFT" modifiers="control,shift" command="cmd_selectLeft2" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control,shift" command="cmd_selectRight2" /> + + <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectUp" /> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectDown" /> + <handler event="keypress" keycode="VK_UP" modifiers="control" command="cmd_moveUp2" /> + <handler event="keypress" keycode="VK_DOWN" modifiers="control" command="cmd_moveDown2" /> + <handler event="keypress" keycode="VK_UP" modifiers="control,shift" command="cmd_selectUp2" /> + <handler event="keypress" keycode="VK_DOWN" modifiers="control,shift" command="cmd_selectDown2" /> + + <handler event="keypress" key="a" modifiers="alt" command="cmd_selectAll"/> + </handlers> + </binding> + + <binding id="editor"> + <handlers> +#include ../editor-base.inc + <handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/> + <handler event="keypress" key="z" modifiers="accel,shift" command="cmd_redo"/> + <handler event="keypress" key="y" modifiers="accel" command="cmd_redo"/> + <handler event="keypress" key="a" modifiers="alt" command="cmd_selectAll"/> + </handlers> + </binding> +</bindings> diff --git a/dom/xbl/builtin/win/jar.mn b/dom/xbl/builtin/win/jar.mn new file mode 100644 index 000000000..9f05c2dd6 --- /dev/null +++ b/dom/xbl/builtin/win/jar.mn @@ -0,0 +1,6 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +toolkit.jar: +* content/global/platformHTMLBindings.xml (platformHTMLBindings.xml) diff --git a/dom/xbl/builtin/win/moz.build b/dom/xbl/builtin/win/moz.build new file mode 100644 index 000000000..eb4454d28 --- /dev/null +++ b/dom/xbl/builtin/win/moz.build @@ -0,0 +1,7 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file diff --git a/dom/xbl/builtin/win/platformHTMLBindings.xml b/dom/xbl/builtin/win/platformHTMLBindings.xml new file mode 100644 index 000000000..1612138e1 --- /dev/null +++ b/dom/xbl/builtin/win/platformHTMLBindings.xml @@ -0,0 +1,164 @@ +<?xml version="1.0"?> +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + + +<bindings id="htmlBindings" + xmlns="http://www.mozilla.org/xbl" + xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + + <binding id="inputFields" bindToUntrustedContent="true"> + <handlers> +#include ../input-fields-base.inc + <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine"/> + <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop"/> + <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom"/> + <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/> + + <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_moveLeft2"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_moveRight2"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control" command="cmd_selectLeft2"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control" command="cmd_selectRight2"/> + + <handler event="keypress" keycode="VK_UP" modifiers="control" command="cmd_moveUp2"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="control" command="cmd_moveDown2"/> + <handler event="keypress" keycode="VK_UP" modifiers="shift,control" command="cmd_selectUp2"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift,control" command="cmd_selectDown2"/> + + <handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cutOrDelete"/> + <handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_deleteWordForward"/> + <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy"/> + <handler event="keypress" keycode="VK_INSERT" modifiers="shift" command="cmd_paste"/> + + <handler event="keypress" keycode="VK_BACK" modifiers="alt" command="cmd_undo"/> + <handler event="keypress" keycode="VK_BACK" modifiers="alt,shift" command="cmd_redo"/> + <handler event="keypress" keycode="VK_BACK" modifiers="control" command="cmd_deleteWordBackward"/> + + <handler event="keypress" key="a" modifiers="accel" command="cmd_selectAll"/> + <handler event="keypress" key="y" modifiers="accel" command="cmd_redo"/> + </handlers> + </binding> + + <binding id="textAreas" bindToUntrustedContent="true"> + <handlers> +#include ../textareas-base.inc + <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine"/> + <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop"/> + <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom"/> + <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/> + + <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_moveLeft2"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_moveRight2"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control" command="cmd_selectLeft2"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control" command="cmd_selectRight2"/> + + <handler event="keypress" keycode="VK_UP" modifiers="control" command="cmd_moveUp2"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="control" command="cmd_moveDown2"/> + <handler event="keypress" keycode="VK_UP" modifiers="shift,control" command="cmd_selectUp2"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift,control" command="cmd_selectDown2"/> + + <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/> + + <handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cutOrDelete"/> + <handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_deleteWordForward"/> + <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy"/> + <handler event="keypress" keycode="VK_INSERT" modifiers="shift" command="cmd_paste"/> + + <handler event="keypress" keycode="VK_BACK" modifiers="alt" command="cmd_undo"/> + <handler event="keypress" keycode="VK_BACK" modifiers="alt,shift" command="cmd_redo"/> + <handler event="keypress" keycode="VK_BACK" modifiers="control" command="cmd_deleteWordBackward"/> + + <handler event="keypress" key="a" modifiers="accel" command="cmd_selectAll"/> + <handler event="keypress" key="y" modifiers="accel" command="cmd_redo"/> + </handlers> + </binding> + + <binding id="browser"> + <handlers> +#include ../browser-base.inc + <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/> + + <handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cut"/> + <handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_deleteWordForward"/> + <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy"/> + <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop" /> + <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom" /> + + <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_moveLeft2" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_moveRight2" /> + <handler event="keypress" keycode="VK_LEFT" modifiers="control,shift" command="cmd_selectLeft2" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="control,shift" command="cmd_selectRight2" /> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectLeft" /> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectRight" /> + + <handler event="keypress" keycode="VK_UP" modifiers="control" command="cmd_moveUp2" /> + <handler event="keypress" keycode="VK_DOWN" modifiers="control" command="cmd_moveDown2" /> + <handler event="keypress" keycode="VK_UP" modifiers="control,shift" command="cmd_selectUp2" /> + <handler event="keypress" keycode="VK_DOWN" modifiers="control,shift" command="cmd_selectDown2" /> + <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectUp" /> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectDown" /> + + <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine" /> + <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine" /> + <handler event="keypress" key="y" modifiers="accel" command="cmd_redo"/> + </handlers> + </binding> + + <binding id="editor"> + <handlers> +#include ../editor-base.inc + <handler event="keypress" key="a" command="cmd_selectAll" modifiers="accel"/> + <handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cutOrDelete"/> + <handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_deleteWordForward"/> + <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy"/> + <handler event="keypress" keycode="VK_INSERT" modifiers="shift" command="cmd_paste"/> + <handler event="keypress" keycode="VK_BACK" modifiers="alt" command="cmd_undo"/> + <handler event="keypress" keycode="VK_BACK" modifiers="alt,shift" command="cmd_redo"/> + + <handler event="keypress" keycode="VK_LEFT" modifiers="accel" command="cmd_moveLeft2"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="accel" command="cmd_moveRight2"/> + <handler event="keypress" keycode="VK_LEFT" modifiers="shift,accel" command="cmd_selectLeft2"/> + <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,accel" command="cmd_selectRight2"/> + + <handler event="keypress" keycode="VK_UP" modifiers="accel" command="cmd_moveUp2"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="accel" command="cmd_moveDown2"/> + <handler event="keypress" keycode="VK_UP" modifiers="shift,accel" command="cmd_selectUp2"/> + <handler event="keypress" keycode="VK_DOWN" modifiers="shift,accel" command="cmd_selectDown2"/> + + <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop"/> + <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom"/> + <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/> + <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/> + <handler event="keypress" keycode="VK_BACK" modifiers="control" command="cmd_deleteWordBackward"/> + + <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/> + <handler event="keypress" keycode="VK_END" command="cmd_endLine"/> + <handler event="keypress" keycode="VK_HOME" command="cmd_selectBeginLine" modifiers="shift"/> + <handler event="keypress" keycode="VK_END" command="cmd_selectEndLine" modifiers="shift"/> + <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/> + <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/> + <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/> + <handler event="keypress" key="y" modifiers="accel" command="cmd_redo"/> + </handlers> + </binding> +</bindings> |