<?xml version="1.0"?> 
<!-- unix version of platformEditorBindings.xul -->

<keybinding id="platformEditorBindings"
	 xmlns:html="http://www.w3.org/TR/REC-html40"
	 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<!-- change the xul key for Unix -->
<keyset id="editorKeySet" xulkey="alt">

<!-- emacs delete keys -->
<key id="emDelCharBWkb" key="h" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_deleteCharBackward');
    controller.doCommand('cmd_deleteCharBackward');"/>
<key id="emDelCharFWkb" key="d" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_deleteCharForward');
    controller.doCommand('cmd_deleteCharForward');"/>
<key id="emDelWordBWkb" key="w" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_deleteWordBackward');
    controller.doCommand('cmd_deleteWordBackward');"/>
<key id="emKillToEndkb" key="k" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_deleteToEndOfLine');
    controller.doCommand('cmd_deleteToEndOfLine');"/>
<key id="emKillToBegkb" key="u" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_deleteToBeginningOfLine');
    controller.doCommand('cmd_deleteToBeginningOfLine');"/>

<!-- emacs motion keys: these use the selection controller API -->
<key id="emBeginLinekb" key="a" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_beginLine');
    controller.doCommand('cmd_beginLine');"/>
<key id="emEndLinekb" key="e" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_endLine');
    controller.doCommand('cmd_endLine');"/>
<key id="emCharPrevkb" key="b" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_charPrevious');
    controller.doCommand('cmd_charPrevious');"/>
<key id="emCharNextkb" key="f" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_charNext');
    controller.doCommand('cmd_charNext');"/>
<key id="emPrevLinekb" key="p" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_linePrevious');
    controller.doCommand('cmd_linePrevious');"/>
<key id="emNextLinekb" key="n" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_lineNext');
    controller.doCommand('cmd_lineNext');"/>

<!-- Add the Windows/Mac cut, copy, paste, undo and redo keys -->
<key id="emCutKey" key="x" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_cut');
    controller.doCommand('cmd_cut');"/>
<key id="emCopyKey" key="c" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_copy');
    controller.doCommand('cmd_copy');"/>
<key id="emPasteKey" key="v" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_paste');
    controller.doCommand('cmd_paste');"/>
<key id="emUndoKey" key="z" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_undo');
    controller.doCommand('cmd_undo');"/>
<key id="emRedoKey" key="r" control="true" shift="false"
  onkeypress="
    var controller = document.commandDispatcher.getControllerForCommand('cmd_redo');
    controller.doCommand('cmd_redo');"/>

</keyset>
<!-- End Unix-specific keybindings -->

</keybinding>

