---
title: "keyEquivalentRect(forBounds:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsmenuitemcell/keyequivalentrect(forbounds:)"
---

# keyEquivalentRect(forBounds:)

Returns the rectangle into which the menu item’s key equivalent should be drawn.

## Declaration

```swift
func keyEquivalentRect(forBounds cellFrame: NSRect) -> NSRect
```

## Parameters

- `cellFrame`: A rectangle that defines the bounds of the receiver.

## Return Value

Return Value The returned rectangle is based on cellFrame but encompasses only the area to be occupied by the key equivalent.

## See Also

### Getting the Menu Item’s Drawing Rectangle

- [stateImageRect(forBounds:)](appkit/nsmenuitemcell/stateimagerect(forbounds:).md)
- [titleRect(forBounds:)](appkit/nsmenuitemcell/titlerect(forbounds:).md)
