<?xml version="1.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="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"/>
    <handler event="keypress" keycode="VK_F14" command="cmd_undo" />
    </handlers>
  </binding>

  <binding id="textAreas">
    <handlers>

    <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"/>
    <handler event="keypress" keycode="VK_F20" command="cmd_cut" />
    <handler event="keypress" keycode="VK_F16" command="cmd_copy" />
    <handler event="keypress" keycode="VK_F18" command="cmd_paste" />
    <handler event="keypress" keycode="VK_F14" command="cmd_undo" />
    </handlers>
  </binding>

  <binding id="browser">
    <handlers>
      <handler event="draggesture">
<!--
         nsDragAndDrop.startDrag(event, contentAreaDNDObserver);
-->
      </handler>
      <handler event="dragover">
<!--
         nsDragAndDrop.dragOver(event, contentAreaDNDObserver);
-->
      </handler>
      <handler event="dragdrop">
<!--
         nsDragAndDrop.drop(event, contentAreaDNDObserver);
-->
      </handler>

      <handler event="keypress" key=" " modifiers="shift" command="cmd_scrollPageUp" />
      <handler event="keypress" key=" " command="cmd_scrollPageDown" />

      <handler event="keypress" keycode="VK_UP" command="cmd_scrollLineUp" />
      <handler event="keypress" keycode="VK_DOWN" command="cmd_scrollLineDown" />
      <handler event="keypress" keycode="VK_LEFT" command="cmd_scrollLeft" />
      <handler event="keypress" keycode="VK_RIGHT" command="cmd_scrollRight" />

      <handler event="keypress" keycode="VK_HOME" command="cmd_scrollTop"/>
      <handler event="keypress" keycode="VK_END" command="cmd_scrollBottom"/>

      <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"/>

      <handler event="keypress" key="/" command="cmd_findTypeText"/>
      <handler event="keypress" key="'" command="cmd_findTypeLinks"/>
      <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" modifiers="shift,control" command="cmd_selectTop" /> 
      <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom" /> 
      <handler event="keypress" keycode="VK_F20" command="cmd_cut" /> 
      <handler event="keypress" keycode="VK_F16" command="cmd_copy" /> 
      <handler event="keypress" keycode="VK_F18" command="cmd_paste" /> 
      <handler event="keypress" keycode="VK_F14" command="cmd_undo" />
      <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>
      <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"/>
      <handler event="keypress" keycode="VK_F20" command="cmd_cut" />
      <handler event="keypress" keycode="VK_F16" command="cmd_copy" />
      <handler event="keypress" keycode="VK_F18" command="cmd_paste" />
      <handler event="keypress" keycode="VK_F14" command="cmd_undo" />
    </handlers>
  </binding>
</bindings>
