# KeyPressEventArgs

Namespace: **Wisej.Web**

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

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

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

```csharp
public class KeyPressEventArgs : EventArgs
```

{% endtab %}

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

```visual-basic
Public Class KeyPressEventArgs
    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) KeyPressEventArgs(keyChar)

Initializes a new instance of the [KeyPressEventArgs](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.keypresseventargs) class.

| Name        | Type                                                      | Description                                                    |
| ----------- | --------------------------------------------------------- | -------------------------------------------------------------- |
| **keyChar** | [Char](https://docs.microsoft.com/dotnet/api/system.char) | The ASCII character corresponding to the key the user pressed. |

## 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) Handled

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the [KeyPress](https://docs.wisej.com/api/wisej.web/general/control/..#keypress) event was handled.

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

[Char](https://docs.microsoft.com/dotnet/api/system.char): Returns or sets the character corresponding to the key pressed.

## Used By

| Name                                                                                                        | Description                                                                                                                                                                                         |
| ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [KeyPressEventHandler](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.keypresseventhandler) | Represents the method that will handle the [KeyPress](https://docs.wisej.com/api/wisej.web/general/control/..#keypress) event of a [Control](https://docs.wisej.com/api/wisej.web/general/control). |
