# EventCommandNames

> Names of the commands the Editor sends to its windows and controls, such as copy, paste, or delete.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.UICommonModule

```csharp
public static class EventCommandNames
```

## Remarks

The Editor sends a command in two phases: a validation phase that asks whether anything handles the command, followed by an execution phase that performs it. Compare the command name against the constants in this class to handle these commands in custom Editor UI. In UI Toolkit, the phases are delivered as ValidateCommandEvent and ExecuteCommandEvent and the name is available through their commandName property. In IMGUI, they are delivered as events of type [EventType.ValidateCommand](/engine/6000.7/script-reference/unityengine/eventtype/validatecommand.md) and [EventType.ExecuteCommand](/engine/6000.7/script-reference/unityengine/eventtype/executecommand.md) and the name is available through [\_commandName](/engine/6000.7/script-reference/unityengine/event/commandname.md).

To indicate that a command is handled, call the event's StopPropagation method in UI Toolkit, or [Event.Use](/engine/6000.7/script-reference/unityengine/event/use.md) in IMGUI, during the validation phase.

## Static Fields

| Value                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                 |
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Copy](/engine/6000.7/script-reference/unityengine/eventcommandnames/copy.md)                                   | The command name for the Copy command, which copies the current selection to the clipboard.                                                                                                                                                                                                                                                                                 |
| [Cut](/engine/6000.7/script-reference/unityengine/eventcommandnames/cut.md)                                     | The command name for the Cut command, which copies the current selection to the clipboard and removes it.                                                                                                                                                                                                                                                                   |
| [Delete](/engine/6000.7/script-reference/unityengine/eventcommandnames/delete.md)                               | The command name for the Delete command, which removes the current selection.                                                                                                                                                                                                                                                                                               |
| [DeselectAll](/engine/6000.7/script-reference/unityengine/eventcommandnames/deselectall.md)                     | The command name for the Deselect All command, which clears the current selection.                                                                                                                                                                                                                                                                                          |
| [Duplicate](/engine/6000.7/script-reference/unityengine/eventcommandnames/duplicate.md)                         | The command name for the Duplicate command, which creates a copy of the current selection.                                                                                                                                                                                                                                                                                  |
| [Find](/engine/6000.7/script-reference/unityengine/eventcommandnames/find.md)                                   | The command name for the Find command, which moves focus to the search field of the current window.                                                                                                                                                                                                                                                                         |
| [FrameSelected](/engine/6000.7/script-reference/unityengine/eventcommandnames/frameselected.md)                 | The command name for the Frame Selected command, which centers the current view on the selection.                                                                                                                                                                                                                                                                           |
| [FrameSelectedWithLock](/engine/6000.7/script-reference/unityengine/eventcommandnames/frameselectedwithlock.md) | The command name for the Frame Selected With Lock command, which centers the current view on the selection and keeps following it when the selection moves.                                                                                                                                                                                                                 |
| [InvertSelection](/engine/6000.7/script-reference/unityengine/eventcommandnames/invertselection.md)             | The command name for the Invert Selection command, which selects the items that are not part of the current selection and deselects the items that are.                                                                                                                                                                                                                     |
| [Paste](/engine/6000.7/script-reference/unityengine/eventcommandnames/paste.md)                                 | The command name for the Paste command, which inserts the clipboard content into the current context.                                                                                                                                                                                                                                                                       |
| [Rename](/engine/6000.7/script-reference/unityengine/eventcommandnames/rename.md)                               | The command name for the Rename command, which starts renaming the current selection.                                                                                                                                                                                                                                                                                       |
| [SelectAll](/engine/6000.7/script-reference/unityengine/eventcommandnames/selectall.md)                         | The command name for the Select All command, which selects every item in the current context.                                                                                                                                                                                                                                                                               |
| [SelectChildren](/engine/6000.7/script-reference/unityengine/eventcommandnames/selectchildren.md)               | The command name for the Select Children command, which extends the selection to the children of the currently selected items.                                                                                                                                                                                                                                              |
| [SelectPrefabRoot](/engine/6000.7/script-reference/unityengine/eventcommandnames/selectprefabroot.md)           | The command name for the Select Prefab Root command, which moves the selection to the root of the Prefab that contains the currently selected GameObject.                                                                                                                                                                                                                   |
| [SoftDelete](/engine/6000.7/script-reference/unityengine/eventcommandnames/softdelete.md)                       | The command name for the Soft Delete command, which removes the current selection. The Editor sends this command instead of [EventCommandNames.Delete](/engine/6000.7/script-reference/unityengine/eventcommandnames/delete.md) when the Delete key is pressed without modifiers, so a handler can implement a less destructive removal, such as keeping references intact. |
| [UndoRedoPerformed](/engine/6000.7/script-reference/unityengine/eventcommandnames/undoredoperformed.md)         | The command name for the notification the Editor sends to its windows after an undo or redo operation completes, so they can refresh the state they display.                                                                                                                                                                                                                |
