Add function to cancel drag by pressing ESC.  Remove debug code.