 
   $(document).mousedown (event) ->
     set_button event.which, true
-  
+
   $(document).mouseup (event) ->
     set_button event.which, false
 

    left:false
    right:false
    middle:false
    location: Point(0,0)
  
  buttons = [null, "left", "middle", "right"]
  
  set_button = (index, state) ->
    button_name = buttons[index]


    x = event.pageX
    y = event.pageY

    Mouse.x = x
    Mouse.y = y

