 
 (defonce setup-event-channels!
   (do
-    (swap-event-channel! :dom-viewport-resize
-                         (poly/channel-for-viewport-resize!))
-    (swap-event-channel! :env-mouse-move
-                         (poly/channel-for-mouse-move! js/window))
+    (swap-event-channel!
+     :dom-viewport-resize (poly/channel-for-viewport-resize!))
+    (swap-event-channel!
+     :env-mouse-down (poly/listen-put! js/window :mouse-down (poly/e-chan)))
+    (swap-event-channel!
+     :env-mouse-move (poly/channel-for-mouse-move! js/window))
+    (swap-event-channel!
+     :env-mouse-up (poly/listen-put! js/window :mouse-up (poly/e-chan)))
     true))
 
 

          :env-mouse-move nil
          :env-mouse-up nil
          }
    :env {:mouse nil
          :time nil
          }
    :gui {:click-count 0

    [:p "Document height " rc-dom-document-h "px"]
;    [:p "Document scroll " rc-dom-document-scroll-x " by " rc-dom-document-scroll-y]
;    [:p "Mouse position " "(" rc-env-mouse-pos-x ", " rc-env-mouse-pos-y ")"]
    [:p "Mouse Move " (rx (str (into (sorted-map) @rc-env-mouse-move)))]
    [:p "Mouse Down " (rx (str (into (sorted-map) @rc-env-mouse-down)))]
    [:p "Mouse Up " (rx (str (into (sorted-map) @rc-env-mouse-up)))]
    [:p "Frames/second (60 max) " rdom/fps]
    [:p "Button Clicks " rc-gui-click-count " "
     [:button {:on-click on-gui-button-click} "Click Me!"]]
