Instance Property


The window that currently receives keyboard events.


weak var keyWindow: NSWindow? { get }


The value of this property is nil when there is no window receiving keyboard events. The property might be nil because the app’s storyboard file has not yet finished loading or when the receiver is not active.

See Also

Managing App Windows

var mainWindow: NSWindow?

The app’s main window.

func window(withWindowNumber: Int) -> NSWindow?

Returns the window corresponding to the specified window number.

var windows: [NSWindow]

An array of the app’s window objects.

func makeWindowsPerform(Selector, inOrder: Bool) -> NSWindow?

Sends the specified message to each of the app’s window objects until one returns a non-nil value.

struct NSApplication.WindowListOptions

This constant indicates a window ordering.