Use ABL to simulate key presses and mouse clicks
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Besides using ABL to simulate the input of characters, including multi-byte characters, you can also use ABL to simulate key presses and mouse clicks in a multi-byte environment.
The following table describes the ABL elements involved and the multi-byte support provided by each.
| ABL element | Description | Example | Multi-byte support |
|---|---|---|---|
| APPLY statement | Applies an event to a widget or a procedure. |
APPLY "CHOOSE" TO order-amt IN FRAME x.
|
The name of the event can contain multi-byte characters. |
| LASTKEY function | Returns, as an integer, the key code of the
most recent keyboard or mouse event.LASTKEY returns
values only after the input method places the data into the keyboard
buffer. |
IF LASTKEY = KEYCODE("F9")...
|
The key sequence can be a multi-byte character. |
| READKEY statement | Reads one keystroke from an input source and
sets the value of LASTKEY to the keystroke's keycode. |
READKEY.
|
The key sequence can be a multi-byte character. |