dom/xbl/builtin/mac/platformHTMLBindings.xml
author Robert O'Callahan <robert@ocallahan.org>
Fri, 10 Jan 2014 16:03:25 +1300
changeset 180086 243259fda9aba5900ae1492c991a0e7a541a584d
parent 151325 content/xbl/builtin/mac/platformHTMLBindings.xml@4bb8320acc0cd0106c21e5ccb989d7e0c7850322
child 221895 ce94fbaec83c207f00d47b22c114c21e55174bca
permissions -rw-r--r--
Bug 946065. Part 4: Move content/xbl to dom/ and flatten away 'src' directory. r=Ms2ger

<?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">
    <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">
    <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_wordPrevious" />
      <handler event="keypress" keycode="VK_RIGHT" modifiers="alt" command="cmd_wordNext" />
      <handler event="keypress" keycode="VK_LEFT" modifiers="alt,shift" command="cmd_selectWordPrevious" />
      <handler event="keypress" keycode="VK_RIGHT" modifiers="alt,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_UP" modifiers="shift" command="cmd_selectLinePrevious" />
      <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectLineNext" />
      <handler event="keypress" keycode="VK_UP" modifiers="accel" command="cmd_moveTop"/>
      <handler event="keypress" keycode="VK_DOWN" modifiers="accel" command="cmd_moveBottom"/>
    </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>