# MxKeyGesture class

Represents a keyboard shortcut consisting of one or two key gestures.

**Namespace:** [`Eremex.AvaloniaUI.Controls.Bars`](./index.md)  
**Assembly:** `Eremex.Avalonia.Controls.dll`  
**NuGet Package:** [Eremex.Avalonia.Controls](https://www.nuget.org/packages/Eremex.Avalonia.Controls)

## Declaration

```csharp
public class MxKeyGesture : IEquatable<MxKeyGesture>
```

## Public Members

| name | description |
| --- | --- |
| [MxKeyGesture](MxKeyGesture/MxKeyGesture.md)(…) | Initializes a new instance of the MxKeyGesture class with the specified keys and modifiers. |
| static [Parse](MxKeyGesture/Parse.md)(…) | Parses a one-key or comma-separated two-key shortcut, or returns null if the string cannot be parsed. |
| [HasSecondKey](MxKeyGesture/HasSecondKey.md) { get; } | Gets whether the shortcut contains a second key gesture. |
| [Key](MxKeyGesture/Key.md) { get; } | Gets the key of the first gesture. |
| [KeyModifiers](MxKeyGesture/KeyModifiers.md) { get; } | Gets the modifiers of the first gesture. |
| [SecondKey](MxKeyGesture/SecondKey.md) { get; } | Gets the key of the second gesture, or Key.None if there is no second gesture. |
| [SecondKeyModifiers](MxKeyGesture/SecondKeyModifiers.md) { get; } | Gets the modifiers of the second gesture, or KeyModifiers.None if there is no second gesture. |
| [Equals](MxKeyGesture/Equals.md)(…) | Returns whether this shortcut and the specified shortcut contain the same keys and modifiers. |
| override [Equals](MxKeyGesture/Equals.md)(…) |  |
| override [GetHashCode](MxKeyGesture/GetHashCode.md)() |  |
| [Matches](MxKeyGesture/Matches.md)(…) | Returns whether the supplied keyboard event matches this single-gesture shortcut. (2 methods) |
| [MatchesFirst](MxKeyGesture/MatchesFirst.md)(…) | Returns whether the keyboard event matches the first gesture of the shortcut. |
| override [ToString](MxKeyGesture/ToString.md)() |  |
| [operator ==](MxKeyGesture/op_Equality.md) | Returns whether the two shortcuts are equal. |
| [operator !=](MxKeyGesture/op_Inequality.md) | Returns whether the two shortcuts are different. |

## See Also

* namespace [Eremex.AvaloniaUI.Controls.Bars](./index.md)

<!-- DO NOT EDIT: generated by xmldocmd for Eremex.Avalonia.Controls.dll -->
