# PreviewKeyDownEventArgs

Namespace: **Wisej.Web**

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

Provides data for the [PreviewKeyDown](https://docs.wisej.com/api/wisej.web/general/control/..#previewkeydown) event.

{% tabs %}
{% tab title="C#" %}

```csharp
public class PreviewKeyDownEventArgs : EventArgs
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class PreviewKeyDownEventArgs
    Inherits EventArgs
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) PreviewKeyDownEventArgs(keyData)

Initializes a new instance of the [PreviewKeyDownEventArgs](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.previewkeydowneventargs) class with the specified key.

| Name        | Type                                                                     | Description                                                                                 |
| ----------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- |
| **keyData** | [Keys](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.keys) | One of the [Keys](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.keys) values. |

## Properties

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Alt

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Control

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) IsInputKey

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns whether a key is a regular input key.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) KeyCode

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) KeyData

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) KeyValue

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Modifiers

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Shift

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

## Used By

| Name                                                                                                                    | Description                                                                                                                                |
| ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| [PreviewKeyDownEventHandler](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.previewkeydowneventhandler) | Represents the method that will handle the [PreviewKeyDown](https://docs.wisej.com/api/wisej.web/general/control/..#previewkeydown) event. |
