<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/handle(_:client:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Objective-C Runtime",
      "ObjectiveC"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(im)handleEvent:client:"
  },
  "title" : "handle(_:client:)"
}
-->

# handle(_:client:)

Handles key down and mouse events.

```
func handle(_ event: NSEvent!, client sender: Any!) -> Bool
```

## Parameters

`event`

The event to handle.

`sender`

The client object sending the event.

## Return Value

[`YES`](/documentation/ObjectiveC/YES) if the event is handled; otherwise [`NO`](/documentation/ObjectiveC/NO).

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)