 (.bind js/Mousetrap #js ["u" "ctrl+z" "command+z"] #(undo/do-undo app-state))
 (.bind js/Mousetrap #js ["ctrl+r"] #(undo/do-redo app-state))
 
+(.bind js/Mousetrap "i" #(swap! app-state update-in [:canvas] start-drawing))
+(.bind js/Mousetrap "esc" (fn [_]
+                            (swap! app-state update-in [:canvas] stop-drawing)
+                            (undo/push-onto-undo-stack @app-state)))
+
+(defn bind-number [nkey width]
+  (.bind js/Mousetrap
+         (str nkey)
+         (fn []
+           (swap! app-state update-in [:tools] assoc :lineWidth width))))
+
+(doseq [i (range 1 10)]
+  (bind-number i i))
+(bind-number 0 10)
+
 (comment
 
 (swap! app-state update-in [:canvas :actions 0 :props] assoc :strokeStyle "#999999")

  (doseq [action (om/value actions)]
    (-draw action context)))

(defn canvas [data owner]
  (reify
    om/IDidMount

           {:onSelectStart (fn [_])
            :onMouseDown (fn [e]
                           (.preventDefault e)
                           (om/transact! data [] start-drawing))
            :onMouseUp (fn [_]
                         (om/transact! data [] stop-drawing :add-to-undo))
            :onMouseMove (fn [e]
                           (when (:drawing? @data)
                             (let [dom (om/get-node owner)
