---
title: XCSourceEditorCommandDefinitionKey
framework: XcodeKit
role: symbol
role_heading: Structure
platforms: [macOS 10.12+]
path: xcodekit/xcsourceeditorcommanddefinitionkey
---

# XCSourceEditorCommandDefinitionKey

A key in the dictionary that defines a source editor command.

## Declaration

```swift
struct XCSourceEditorCommandDefinitionKey
```

## Mentioned in

Creating a Source Editor Extension

## Overview

Overview Source editor commands are defined via an array of dictionaries under the XCSourceEditorCommandDefinitions key of a Xcode Source Editor Extension’s NSExtensionAttributes within its Info.plist file. Commands can also be specified via the commandDefinitions property in an extension’s conformance to the XCSourceEditorExtension protocol.

## Topics

### Populating a Command Definition Dictionary

- [classNameKey](xcodekit/xcsourceeditorcommanddefinitionkey/classnamekey.md)
- [identifierKey](xcodekit/xcsourceeditorcommanddefinitionkey/identifierkey.md)
- [nameKey](xcodekit/xcsourceeditorcommanddefinitionkey/namekey.md)

### Creating a Key Using a Raw String

- [init(rawValue:)](xcodekit/xcsourceeditorcommanddefinitionkey/init(rawvalue:).md)

### Type Properties

- [systemSymbolNameKey](xcodekit/xcsourceeditorcommanddefinitionkey/systemsymbolnamekey.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
