KeyboardEventArgs Class

Definition

Supplies information about a keyboard event that is being raised.

public ref class KeyboardEventArgs : EventArgs
public class KeyboardEventArgs : EventArgs
type KeyboardEventArgs = class
    inherit EventArgs
Public Class KeyboardEventArgs
Inherits EventArgs
Inheritance
KeyboardEventArgs

Constructors

KeyboardEventArgs()

Properties

AltKey

true if the alt key was down when the event was fired. false otherwise.

Code

Holds a string that identifies the physical key being pressed. The value is not affected by the current keyboard layout or modifier state, so a particular key will always return the same value.

CtrlKey

true if the control key was down when the event was fired. false otherwise.

Key

The key value of the key represented by the event. If the value has a printed representation, this attribute's value is the same as the char attribute. Otherwise, it's one of the key value strings specified in 'Key values'. If the key can't be identified, this is the string "Unidentified"

Location

The location of the key on the device.

MetaKey

true if the meta key was down when the event was fired. false otherwise.

Repeat

true if a key has been depressed long enough to trigger key repetition, otherwise false.

ShiftKey

true if the shift key was down when the event was fired. false otherwise.

Type

Gets or sets the type of the event.

Applies to