Instance Method

selectPreviousKeyView(_:)

This action method searches for a candidate previous key view and, if it finds one, invokes makeFirstResponder(_:) to establish it as the first responder.

Declaration

func selectPreviousKeyView(_ sender: Any?)

Parameters

sender

The message’s sender.

Discussion

The candidate is one of the following (searched for in this order):

  • The current first responder’s previous valid key view, as returned by the previousValidKeyView method of NSView

  • The object designated as the window’s initial first responder (using initialFirstResponder) if it returns true to an acceptsFirstResponder message

  • Otherwise, the initial first responder’s previous valid key view, which may end up being nil

See Also

Managing the Key View Loop

func selectKeyView(preceding: NSView)

Makes key the view that precedes the given view.

func selectKeyView(following: NSView)

Makes key the view that follows the given view.

func selectNextKeyView(Any?)

This action method searches for a candidate next key view and, if it finds one, invokes makeFirstResponder(_:) to establish it as the first responder.

var keyViewSelectionDirection: NSWindow.SelectionDirection

The direction the window is currently using to change the key view.

var autorecalculatesKeyViewLoop: Bool

A Boolean value that indicates whether the window automatically recalculates the key view loop when views are added.

func recalculateKeyViewLoop()

Marks the key view loop as dirty and in need of recalculation.