Class CustomKeyEventArgs
Base class for KeyEventArgs and PreviewKeyDownEventArgs classes.
public class CustomKeyEventArgs : KeyboardEventArgs
- Inheritance
-
CustomKeyEventArgs
- Derived
Constructors
- CustomKeyEventArgs()
Initializes a new instance of the CustomKeyEventArgs class.
- CustomKeyEventArgs(object, Key, ModifierKeys)
Initializes a new instance of the CustomKeyEventArgs class with the specified original target object.
Properties
- Alt
Gets a value indicating whether the ALT key was pressed.
- Control
Gets a value indicating whether the CTRL key was pressed.
- ControlAndShift
Gets whether CTRL and SHIFT keys are pressed.
- HasModifiers
Gets wherher any modifiers are pressed.
- IsAnyMinusKey
Get whether Key is minus or numpad minus character.
- IsAnyPlusKey
Get whether Key is plus or numpad plus character.
- IsEnter
Gets whether 'Enter' key is pressed without modifiers (ModifierKeys is empty).
- IsEscape
Gets whether 'Escape' key is pressed without modifiers (ModifierKeys is empty).
- Key
Gets or sets the key referenced by the event.
- KeyCode
Gets the keyboard code for a KeyDown event. Contains key code for the key that was pressed without modifier flags.
- KeyData
Gets the key data for a KeyDown event. Contains key code for the key that was pressed, combined with modifier flags that indicate which combination of CTRL, SHIFT, and ALT keys was pressed at the same time.
- ModifierKeys
Gets or sets the set of modifier keys pressed at the time when event was received.
- Modifiers
Gets the modifier flags for a KeyDown event. The flags indicate which combination of CTRL, SHIFT, and ALT keys was pressed.
- Shift
Gets a value indicating whether the SHIFT key was pressed.
- ShiftOrNone
Gets a value indicating whether the SHIFT key was pressed or no other modifiers were pressed.
Methods
- IsSimpleKey(Key)
Gets whether the specified key is pressed and ModifierKeys is empty.
- ToString()
Returns a string that represents the current object.