# KeyEventArgs

URL: https://docs.wisej.com/api/wisej.web/general/control/wisej.web.keyeventargs

Version: 4.1
Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.1.0.0)

Provides data for the [KeyDown](/api/wisej.web/general/control/#keydown) or [KeyUp](/api/wisej.web/general/control/#keyup) event.

- C# - VB.NET

```csharp
public class KeyEventArgs : EventArgs
```

```visual
Public Class KeyEventArgs
    Inherits EventArgs
```

## Constructors

### ![Instance member](/img/api/instance.png) KeyEventArgs(keyData)

Initializes a new instance of the [KeyEventArgs](/api/wisej.web/general/control/wisej.web.keyeventargs) class.

| Name | Type | Description | **keyData** | [Keys](/api/wisej.web/enumerations/wisej.web.keys) | A [Keys](/api/wisej.web/enumerations/wisej.web.keys) representing the key that was pressed, combined with any modifier flags that indicate which CTRL, SHIFT, and ALT keys were pressed at the same time. Possible values are obtained be applying the bitwise OR (|) operator to constants from the [Keys](/api/wisej.web/enumerations/wisej.web.keys) enumeration. 

## Properties

### ![Instance member](/img/api/instance.png) Alt

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) : Returns whether the ALT key was pressed.

### ![Instance member](/img/api/instance.png) Control

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) : Returns whether the CTRL key was pressed.

### ![Instance member](/img/api/instance.png) Handled

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) : Returns or sets whether the event was handled.

### ![Instance member](/img/api/instance.png) KeyCode

[Keys](/api/wisej.web/enumerations/wisej.web.keys) : Returns the keyboard code..

### ![Instance member](/img/api/instance.png) KeyData

[Keys](/api/wisej.web/enumerations/wisej.web.keys) : Returns the key data.

### ![Instance member](/img/api/instance.png) KeyValue

[Int32](https://docs.microsoft.com/dotnet/api/system.int32) : Returns the keyboard value.

### ![Instance member](/img/api/instance.png) Modifiers

[Keys](/api/wisej.web/enumerations/wisej.web.keys) : Returns the modifier flags indicating which combination of CTRL, SHIFT, and ALT keys was pressed.

### ![Instance member](/img/api/instance.png) Shift

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) : Returns a value indicating whether the SHIFT key was pressed.

## Methods

### ![Instance member](/img/api/instance.png) IsAltPressed()

Returns whether the Alt key is pressed.

**Returns:**[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) .

### ![Instance member](/img/api/instance.png) IsCtrlPressed()

Returns whether the Control key is pressed.

**Returns:**[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) .

### ![Instance member](/img/api/instance.png) IsShiftPressed()

Returns whether the Shift key is pressed.

**Returns:**[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) .

## Used By

| Name | Description | [KeyEventHandler](/api/wisej.web/general/control/wisej.web.keyeventhandler) | Represents the method that will handle the [KeyUp](/api/wisej.web/general/control/#keyup) or [KeyDown](/api/wisej.web/general/control/#keydown) event of aControl .
