Added keypress handling for cancelling the alarm