Only handle the keyboard if there is an active view.