 (defn key-press
   "Update the state in response to a keypress."
   [key state]
+  ;(println "key-press" key)
   (cond
-    (= :lshift key) (do (reset! shift-key-down true) state)
+    ;(= :lshift key) (do (reset! shift-key-down true) state)
+    (= "z" key) (do (reset! shift-key-down true) state)
     (= "p" key) (do (app/pause!)
                   state)
     (= "o" key) (do (screenshot (str "brevis_screenshot_" (System/currentTimeMillis) ".png") state)

(defn screenshot
  "Take a screenshot. Currently captures the entire screen."
  [filename state]
  (println [(:window-x state) (:window-y state) (:window-width state) (:window-height state)])
  (let [img-type (second (re-find (re-matcher #"\.(\w+)$" filename)))
				capture (.createScreenCapture (Robot.)
							      ;(Rectangle. (.getScreenSize (Toolkit/getDefaultToolkit))));; captures entire screen

(defn key-release
  "Update the state in response to the release of a key"
  [key state]
  ;(println "key-release" key) 
  (cond
    ;(= :lshift key) (reset! shift-key-down false))
    (= "z" key) (reset! shift-key-down false))
  state)

;; ## Input handling
