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

    x = event.pageX
    y = event.pageY

    Mouse.location = Point(x, y)
    Mouse.x = x
    Mouse.y = y


    left:false
    right:false
    middle:false

  buttons = [null, "left", "middle", "right"]

  set_button = (index, state) ->
    button_name = buttons[index]

