     (if (and key (not (empty? key)) (not (some #{key} mod-keys)))
       (string/join "+" (conj mods key)))))
 
+(defn alphanumeric [s]
+  (re-find #"^[a-z0-9]+$" s))
+
 (defn handle-new-note-keydown [e app owner]
-  (let [code (event->key e)]
+  (let [code (event->key e)
+        which (.-which e)
+        key (.toLowerCase (js/String.fromCharCode which))]
+  (if (or (alphanumeric key) (== code "space"))
+  (do
+    (om/transact! app [:current :title]
+      #(str % key)
+      [:title nil])
+  )
+  (do
   (case code
     "enter"
     (do

(defn now [] (new js/Date))
(def custom-formatter (time-format/formatter "dd/MM/yyyy"))
(def app-title (str "Notes " (time-format/unparse custom-formatter (time-core/date-time (.getFullYear (now)) (+ 1 (.getMonth (now))) (.getDate (now))))))
(def app-state (atom {:notes [] :tab 0 }))

(defn note-view  [note owner]
  (reify

        (let [new-note {:id (guid)
                        :title (.-value new-field)
                        :status "pending"
                        :tab (get-in @app [:current :tab])}]
          (om/transact! app :entered
            #(conj % new-note)
            [:create new-note])
          (om/transact! app [:current :title]
            (fn [_] "")
            [:clean-current]))
        ))
        false)
    "tab" (do
      (om/transact! app [:current :tab]
        #(+ % 1)
        [:tab nil])
      false)
    "shift+tab" (do
      (om/transact! app [:current :tab]
        #(- % 1)
        [:tab nil])
      false)
    nil
    )))))

(defn focus-on-input [] (-> js/document (.querySelector "input") (.focus)))

