---
title: firstResponder
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nswindow/firstresponder
---

# firstResponder

The window’s first responder.

## Declaration

```swift
weak var firstResponder: NSResponder? { get }
```

## Discussion

Discussion The first responder is usually the first object in a responder chain to receive an event or action message. In most cases, the first responder is a view object that the user selects or activates with the mouse or keyboard. You can use the firstResponder property in custom subclasses of responder classes (NSWindow, NSApplication, NSView, and subclasses) to determine if an instance of the subclass is currently the first responder. You can also use it to help locate a text field that currently has first-responder status. For more information, see Mouse, Keyboard, and Trackpad. This property is key-value observing compliant.

## See Also

### Related Documentation

- [acceptsFirstResponder](appkit/nsresponder/acceptsfirstresponder.md)

### Managing Responders

- [initialFirstResponder](appkit/nswindow/initialfirstresponder.md)
- [makeFirstResponder(_:)](appkit/nswindow/makefirstresponder(_:).md)
