<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) DbVis Software AB. All Rights Reserved.
  -->

<keybindings name="macOS" parent="$mac-default$" active="false">
   <bind>
      <action-id>clear-editor-command</action-id>
      <key>shift meta pressed DELETE</key>
   </bind>
   <bind>
      <action-id>clear-editor-command</action-id>
      <key>shift meta pressed BACK_SPACE</key>
   </bind>
   <bind>
      <action-id>find-next-command</action-id>
      <key>meta pressed G</key>
   </bind>
   <bind>
      <action-id>find-previous-command</action-id>
      <key>shift meta pressed G</key>
   </bind>
   <bind>
      <action-id>goto-line-command</action-id>
      <key>ctrl pressed G</key>
   </bind>
   <bind>
      <action-id>history-back-command</action-id>
      <key>meta pressed OPEN_BRACKET</key>
   </bind>
   <bind>
      <action-id>history-back-command</action-id>
      <key>meta alt pressed P</key>
   </bind>
   <bind>
      <action-id>history-first-command</action-id>
      <key>shift meta pressed OPEN_BRACKET</key>
   </bind>
   <bind>
      <action-id>history-first-command</action-id>
      <key>shift meta alt pressed P</key>
   </bind>
   <bind>
      <action-id>history-last-command</action-id>
      <key>shift meta pressed CLOSE_BRACKET</key>
   </bind>
   <bind>
      <action-id>history-last-command</action-id>
      <key>shift meta alt pressed N</key>
   </bind>
   <bind>
      <action-id>history-next-command</action-id>
      <key>meta pressed CLOSE_BRACKET</key>
   </bind>
   <bind>
      <action-id>history-next-command</action-id>
      <key>meta alt pressed N</key>
   </bind>
   <bind>
      <action-id>print-command</action-id>
      <key>meta pressed P</key>
   </bind>
   <bind>
      <action-id>replace-command</action-id>
      <key>ctrl pressed H</key>
   </bind>
   <bind>
      <action-id>show-auto-completion-command</action-id>
      <key>ctrl pressed SPACE</key>
   </bind>
   <bind>
      <action-id>delete-command</action-id>
      <key>meta pressed BACK_SPACE</key>
   </bind>
   <bind>
      <action-id>close-command</action-id>
      <key>meta pressed W</key>
   </bind>
   <bind>
      <action-id>docking-frame-close-command</action-id>
      <key>meta pressed W</key>
   </bind>
   <bind>
      <action-id>docking-frame-close2-command</action-id>
      <key>meta alt pressed W</key>
   </bind>
   <bind>
      <action-id>goto-next-tab-command</action-id>
      <key>ctrl pressed RIGHT</key>
   </bind>
   <bind>
      <action-id>goto-previous-tab-command</action-id>
      <key>ctrl pressed LEFT</key>
   </bind>
   <bind>
      <action-id>goto-parent-dock-panel-command</action-id>
      <key>ctrl shift pressed UP</key>
   </bind>
   <bind>
      <action-id>goto-child-dock-panel-command</action-id>
      <key>ctrl shift pressed DOWN</key>
   </bind>
   <!--Need to re-map this from standard Ctrl+H (automatically mapped to meta+H)-->
   <!--since meta+H and meta+shift+H are already used in OS X (Hide Application/Hide All)-->
   <bind>
      <action-id>copy-selected-cells-with-header-command</action-id>
      <key>meta pressed B</key>
   </bind>
   <bind>
      <action-id>copy-selected-cells-as-text-with-header-command</action-id>
      <key>meta alt pressed B</key>
   </bind>

   <bind>
      <action-id>nb.caret-begin</action-id>
      <key>meta pressed UP</key>
   </bind>
   <bind>
      <action-id>nb.caret-backward</action-id>
      <key>pressed LEFT</key>
   </bind>
   <bind>
      <action-id>nb.caret-backward</action-id>
      <key>pressed KP_LEFT</key>
   </bind>
   <bind>
      <action-id>nb.caret-backward</action-id>
      <key>ctrl pressed B</key>
   </bind>
   <bind>
      <action-id>nb.caret-down</action-id>
      <key>pressed DOWN</key>
   </bind>
   <bind>
      <action-id>nb.caret-down</action-id>
      <key>pressed KP_DOWN</key>
   </bind>
   <bind>
      <action-id>nb.caret-down</action-id>
      <key>ctrl pressed N</key>
   </bind>
   <bind>
      <action-id>nb.caret-end</action-id>
      <key>meta pressed DOWN</key>
   </bind>
   <bind>
      <action-id>nb.caret-end-line</action-id>
      <key>meta pressed RIGHT</key>
   </bind>
   <bind>
      <action-id>nb.caret-end-line</action-id>
      <key>END</key>
   </bind>
   <!--
   <bind>
      <action-id>nb.caret-end-word</action-id>
      <key>ctrl alt pressed U, E</key>
   </bind>
   -->
   <bind>
      <action-id>nb.caret-forward</action-id>
      <key>pressed RIGHT</key>
   </bind>
   <bind>
      <action-id>nb.caret-forward</action-id>
      <key>pressed KP_RIGHT</key>
   </bind>
   <bind>
      <action-id>nb.caret-forward</action-id>
      <key>ctrl pressed F</key>
   </bind>
   <bind>
      <action-id>nb.caret-line-first-column</action-id>
      <key>meta pressed LEFT</key>
   </bind>
   <bind>
      <action-id>nb.caret-next-word</action-id>
      <key>alt pressed RIGHT</key>
   </bind>
   <bind>
      <action-id>nb.caret-previous-word</action-id>
      <key>alt pressed LEFT</key>
   </bind>
   <bind>
      <action-id>nb.caret-up</action-id>
      <key>pressed UP</key>
   </bind>
   <bind>
      <action-id>nb.caret-up</action-id>
      <key>pressed KP_UP</key>
   </bind>
   <bind>
      <action-id>nb.caret-up</action-id>
      <key>ctrl pressed P</key>
   </bind>
   <bind>
      <action-id>nb.delete-next</action-id>
      <key>ctrl pressed D</key>
   </bind>
   <bind>
      <action-id>nb.delete-next</action-id>
      <key>pressed DELETE</key>
   </bind>

   <bind>
      <action-id>nb.page-down</action-id>
      <key>ctrl pressed DOWN</key>
   </bind>
   <bind>
      <action-id>nb.page-down</action-id>
      <key>pressed PAGE_DOWN</key>
   </bind>
   <bind>
      <action-id>nb.page-up</action-id>
      <key>ctrl pressed UP</key>
   </bind>
   <bind>
      <action-id>nb.page-up</action-id>
      <key>pressed PAGE_UP</key>
   </bind>

   <bind>
      <action-id>nb.remove-line-begin</action-id>
      <key>meta pressed BACK_SPACE</key>
   </bind>
   <bind>
      <action-id>nb.remove-word</action-id>
      <key>ctrl alt pressed D</key>
   </bind>
   <bind>
      <action-id>nb.remove-word</action-id>
      <key>alt pressed BACK_SPACE</key>
   </bind>
   <bind>
      <action-id>nb.remove-word-next</action-id>
      <key>alt pressed DELETE</key>
   </bind>
<!--
   <bind>
      <action-id>nb.scroll-down</action-id>
      <key>NULL</key>
   </bind>
   <bind>
      <action-id>nb.scroll-bottom</action-id>
      <key>NULL</key>
   </bind>
   <bind>
      <action-id>nb.scroll-up</action-id>
      <key>NULL</key>
   </bind>
-->
   <bind>
      <action-id>nb.selection-begin</action-id>
      <key>shift meta pressed UP</key>
   </bind>
   <bind>
      <action-id>nb.selection-end</action-id>
      <key>shift meta pressed DOWN</key>
   </bind>
   <bind>
      <action-id>nb.selection-end-line</action-id>
      <key>shift meta pressed RIGHT</key>
   </bind>
   <bind>
      <action-id>nb.selection-line-first-column</action-id>
      <key>shift meta pressed LEFT</key>
   </bind>
   <bind>
      <action-id>nb.selection-next-word</action-id>
      <key>shift alt pressed RIGHT</key>
   </bind>
   <bind>
      <action-id>nb.selection-previous-word</action-id>
      <key>shift alt pressed LEFT</key>
   </bind>
</keybindings>
