         (go-loop []
           (let [[action params] (<! channel)]
             (save-document app)
-            (recur)))))
+            (recur))))
+      (listen js/document EventType/KEYDOWN app))
     om/IRender
     (render [_]
       (dom/div #js {:className "container"}

  (p/set-document (:title @app) (:input @app))
  (om/update! app :titles (p/get-all-titles)))

(defn wordsmith-app [app owner]
  (reify
    om/IWillMount

            [wordsmith.editor :as e]
            [cljs.core.async :refer [put! chan <!]]
            [goog.string :as gstring]
            [goog.string.format]
            [goog.events :as events])
  (:import [goog.events EventType]))

(enable-console-print!)

