Checked for isKeyWindow before processing keyboard input.