React correctly to cancel and clear button presses