---
title: "makeKeyAndOrderFront(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindow/makekeyandorderfront(_:)"
---

# makeKeyAndOrderFront(_:)

Moves the window to the front of the screen list, within its level, and makes it the key window; that is, it shows the window.

## Declaration

```swift
func makeKeyAndOrderFront(_ sender: Any?)
```

## Parameters

- `sender`: The message’s sender.

## See Also

### Related Documentation

- [orderBack(_:)](appkit/nswindow/orderback(_:).md)
- [orderFront(_:)](appkit/nswindow/orderfront(_:).md)
- [level](appkit/nswindow/level-swift.property.md)
- [order(_:relativeTo:)](appkit/nswindow/order(_:relativeto:).md)
- [orderOut(_:)](appkit/nswindow/orderout(_:).md)

### Managing Key Status

- [isKeyWindow](appkit/nswindow/iskeywindow.md)
- [canBecomeKey](appkit/nswindow/canbecomekey.md)
- [makeKey()](appkit/nswindow/makekey().md)
- [becomeKey()](appkit/nswindow/becomekey().md)
- [resignKey()](appkit/nswindow/resignkey().md)
