     om/IDidMount
     (did-mount [_]
       (let [action-chan (om/get-state owner :action-chan)]
+        (.addEventListener js/window "keyup" #(put! action-chan {:type :keyup
+                                                                 :key (.-keyCode %)}))
         (go-loop []
                  (let [message (<! action-chan)
                        message-type (message :type)]
-                   (println message-type)
                    (condp = message-type
                      :click (let [new-selection (message :square)
                                   old-selection (om/get-state owner :selected)]

                                  (om/transact! app-state
                                                (fn [{:keys [game hist]}]
                                                  {:game (move game old-selection new-selection)
                                                   :hist (vec (conj (seq hist) game))}))
                                  (om/set-state! owner :selected nil))
                                (if (in (deref game) new-selection)
                                  (om/set-state! owner :selected new-selection))))))
                 (recur))))
    om/IDisplayName
    (display-name [_]

    (display-name [_]
      "square")))



(defn board [{:keys [game hist] :as app-state} owner]
  (reify
    om/IInitState
