    ["M" "r"] :paredit-raise-sexp
    ["C" "0"] :paredit-forward-slurp-sexp
    ["C" "9"] :paredit-backward-slurp-sexp
+   ["C" "Open Bracket"] :paredit-backward-barf-sexp
    ["C" "Close Bracket"] :paredit-forward-barf-sexp
-   ["C" "Open Bracket"] :paredit-backward-barf-sexp
    ["M" "S"] :paredit-split-sexp
    ["M" "J"] :paredit-join-sexps
-   ["M" "Right"] :paredit-expand-right
-   ["M" "Left"] :paredit-expand-left})
+   ["M" "Left"] :paredit-expand-left
+   ["M" "Right"] :paredit-expand-right})
+
+(def ^:const advanced-alternate-keymap
+  {[nil "⌫"] :paredit-backward-delete
+   [nil "⌦"] :paredit-forward-delete
+   ["C" "["] :paredit-backward-barf-sexp
+   ["C" "]"] :paredit-forward-barf-sexp
+   ["M" "←"] :paredit-expand-left
+   ["M" "→"] :paredit-expand-right})
 
 (def ^:const foreign-keymap
   {["M" "["] :paredit-open-square

   [nil "{"] :paredit-open-curly
   [nil "}"] :paredit-close-curly
   [nil "\b"] :paredit-backward-delete
   [nil "\""] :paredit-doublequote
   [nil "DEL"] :paredit-forward-delete
   ; ["C" "K"] :paredit-kill
   ["M" "("] :paredit-wrap-round
   ; ["M" ")"] :paredit-close-round-and-newline

   ["M" "{"] :paredit-open-curly
   ["M" "}"] :paredit-close-curly})

(def ^:const special-codes
  #{KeyEvent/VK_LEFT_PARENTHESIS
    KeyEvent/VK_RIGHT_PARENTHESIS
    KeyEvent/VK_OPEN_BRACKET
    KeyEvent/VK_CLOSE_BRACKET
    KeyEvent/VK_BRACELEFT
    KeyEvent/VK_BRACERIGHT
    KeyEvent/VK_BACK_SPACE
    KeyEvent/VK_DELETE
    KeyEvent/VK_QUOTEDBL
    KeyEvent/VK_LEFT
    KeyEvent/VK_RIGHT})

(defn exec-paredit!
  [k w buffer enable-default? enable-advanced?]
  (when-let [cmd (or (and enable-default?
                          (default-keymap k))
                     (and @enable-advanced?
                          (or (advanced-keymap k)
                              (advanced-alternate-keymap k)
                              (foreign-keymap k))))]
    (insert-result! w (exec-command cmd w buffer))
    cmd))

(defn convert-key-event
  [event]
