---
title: InspectorCommands
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/inspectorcommands
---

# InspectorCommands

A built-in set of commands for manipulating inspectors.

## Declaration

```swift
nonisolated struct InspectorCommands
```

## Overview

Overview InspectorCommands include a command for toggling the presented state of the inspector with a keyboard shortcut of Control-Command-I. These commands are optional and can be explicitly requested by passing a value of this type to the commands(content:) modifier: @State var presented = true WindowGroup {     MainView()         .inspector(isPresented: $presented) {             InspectorView()         } } .commands {     InspectorCommands() }

## Topics

### Creating a command

- [init()](swiftui/inspectorcommands/init().md)

## Relationships

### Conforms To

- [Commands](swiftui/commands.md)

## See Also

### Getting built-in command groups

- [SidebarCommands](swiftui/sidebarcommands.md)
- [TextEditingCommands](swiftui/texteditingcommands.md)
- [TextFormattingCommands](swiftui/textformattingcommands.md)
- [ToolbarCommands](swiftui/toolbarcommands.md)
- [ImportFromDevicesCommands](swiftui/importfromdevicescommands.md)
- [EmptyCommands](swiftui/emptycommands.md)
