Table of Contents

Class KeyGesture

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Contains key and key modifiers combination.

[TypeConverter(typeof(KeyGestureConverter))]
public class KeyGesture : InputGesture, IBaseObject
Inheritance
KeyGesture
Implements

Constructors

KeyGesture(Key)

Initializes a new instance of the KeyGesture class with key value.

KeyGesture(Key, ModifierKeys)

Initializes a new instance of the KeyGesture class with key and key modifiers values.

KeyGesture(Key, ModifierKeys, bool)

Initializes a new instance of the KeyGesture class.

KeyGesture(Key, ModifierKeys, string)

Initializes a new instance of the KeyGesture class with key, key modifiers and display string values.

KeyGesture(Key, ModifierKeys, string, bool)

Initializes a new instance of the KeyGesture class.

Fields

MultipleGestureDelimiter

Represents the delimiter character used to separate multiple gestures in a gesture string.

Properties

DisplayString

Gets display string for the end user.

Key

Gets key associated with this KeyGesture.

Modifiers

Gets key modifiers associated with this KeyGesture (Alt, Control, Shift, etc.)

Methods

GetDisplayStringForCulture(CultureInfo)

Returns a string that can be used to display the KeyGesture. If the DisplayString was set by the constructor, it is returned. Otherwise a suitable string is created from the Key and Modifiers, with any conversions being governed by the given CultureInfo.

HasKey(Key, ModifierKeys)

Gets whether Key and Modifiers are equal to the values specified in the parameters.

HasKey(KeyGesture?)

Determines whether the specified key gesture has the same Key and Modifiers as this instance.

IsDefinedKey(Key)

Checks for valid enum, as any int can be casted to the enum.

IsValid()

Checks whether Key and Modifiers combination is valid.

IsValid(Key, ModifierKeys)

Checks whether key and key modifiers combination is valid.

ToString()

Returns a string that represents the current object.

Operators

implicit operator KeyGesture(string)

Implicit operator conversion from the string to the KeyGesture.