Prevent key events being sent to a finished task.