# KeyUp Event

> Occurs when the user releases a key in the TXTextControl; passes the virtual-key code, which can be changed, and the SHIFT, CTRL and ALT key state (1, 2, 4).

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Event
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > KeyUp Event
- **299 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/keyup-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/keyup-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/keyup-event/llms-full.txt

---

Occurs when the user releases a key while the Text Control has the input focus. To interpret ANSI characters, use the [KeyPress](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/keypress-event/llms-full.txt) event.

### Syntax

```vbscript
KeyUp(KeyCode, Shift)
```

### Parameters

| Parameter | Description |
|---|---|
| KeyCode | Is the virtual-key code of the released key. When this value is changed, Text Control handles the changed key. |
| Shift | Informs about the state of the SHIFT, CTRL and ALT keys at the time of the event. It is the sum of one or more of the following values: |

#### Shift

| Value | Description |
|---|---|
| 1 | The SHIFT key was pressed at the time of the event. |
| 2 | The CTRL key was pressed at the time of the event. |
| 4 | The ALT key was pressed at the time of the event. |

### Data Types

| Name | Data type |
|---|---|
| KeyCode | Integer |
| Shift | Integer |

### See Also

- [KeyDown Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/keydown-event/llms-full.txt)
- [KeyPress Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/keypress-event/llms-full.txt)
- [Programming Category: Text Selections and Character Input](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/selections/llms-full.txt)

---

## Nearby

- **Previous:** [KeyStateChange Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/keystatechange-event/llms-full.txt)
- **Next:** [Language Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/language-property/llms-full.txt)
