# KeyCombination

> Represents a combination of a non-modifier key and zero or more modifier keys.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEditor.ShortcutManagement](/engine/6000.6/script-reference/unityeditor/shortcutmanagement.md)
* **Assembly:** UnityEditor.CoreModule
* **Implements:** [IEquatable\<KeyCombination>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public struct KeyCombination : IEquatable<KeyCombination>
```

## Constructors

| Constructor                                                                                                                                                                   | Description                                                               |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| [KeyCombination(UnityEngine.KeyCode,UnityEditor.ShortcutManagement.ShortcutModifiers)](/engine/6000.6/script-reference/unityeditor/shortcutmanagement/keycombination/ctor.md) | Creates a new key combination with given key code and shortcut modifiers. |

## Properties

| Property                                                                                                | Description                                                                                                                                             |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [action](/engine/6000.6/script-reference/unityeditor/shortcutmanagement/keycombination/action.md)       | Is the *action* key modifier part of the key combination? The action key represents the Control key on Windows and Linux, and the Command key on macOS. |
| [alt](/engine/6000.6/script-reference/unityeditor/shortcutmanagement/keycombination/alt.md)             | Is the Alt key (or Option key on macOS) modifier part of the key combination?                                                                           |
| [control](/engine/6000.6/script-reference/unityeditor/shortcutmanagement/keycombination/control.md)     | Determines if the Control key modifier is part of the key combination. Represents the Control key on Windows, macOS, and Linux.                         |
| [keyCode](/engine/6000.6/script-reference/unityeditor/shortcutmanagement/keycombination/keycode.md)     | Key code representing non-modifier key of key combination.                                                                                              |
| [modifiers](/engine/6000.6/script-reference/unityeditor/shortcutmanagement/keycombination/modifiers.md) | Modifier keys of key combination.                                                                                                                       |
| [shift](/engine/6000.6/script-reference/unityeditor/shortcutmanagement/keycombination/shift.md)         | Is the Shift key modifier part of key combination?                                                                                                      |

## Methods

| Method                                                                                                | Description                                       |
| ----------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| [ToString](/engine/6000.6/script-reference/unityeditor/shortcutmanagement/keycombination/tostring.md) | Returns string representation of key combination. |
