         e.preventDefault()
         e.stopPropagation())
 
-
     $(document).bind('keydown', (e) =>
       if e[@options.keyName]
         @_start_drag()
+      #disable the tool when ESC is pressed
       if e.keyCode == 27
         eventSink.trigger("clear_active_tool"))
-
 
     $(document).bind('keyup', (e) =>
       if not e[@options.keyName]

      start_x : null
      start_y : null
      current_x : null
      current_y : null
    )
    @plotview.$el.removeClass("shading")
    for renderer in @mget_obj('renderers')
      renderer.get_obj('data_source').set('selecting', false)

    SetBasepoint : "_start_selecting",
    deactivated : "_stop_selecting"}

  mouse_coords : (e, x, y) ->
    [x, y] = [@plot_view.viewstate.rxpos(x), @plot_view.viewstate.rypos(y)]
    return [x, y]
