Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Whats a key window in Objective-C Cocoa?

What is a key window? And what is it used for? I read its used for "key input";but could someone expand on this? An example would be appreciated.

like image 267
fdh Avatar asked Jan 25 '12 00:01

fdh


1 Answers

The "key window" is the window that is currently accepting mouse and keyboard events. Usually the main window and the key window are the same, but that's not necessarily true (for example, if you have a utility window open, it can't be the main window, but it may become the key window).

like image 126
Lily Ballard Avatar answered Nov 05 '22 12:11

Lily Ballard