[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Controls' (#lcl)

# TWinControl.UTF8KeyPress

Signals the OnUTF8KeyPress event handler (when assigned).

## Declaration

Source position: controls.pp line 2277

`protected procedure TWinControl.UTF8KeyPress(`
`var UTF8Key: TUTF8Char`
`); virtual;`

## Arguments

`UTF8Key` |  | UTF-8-encoded character value for the key press event.

## Description

UTF8KeyPress is called from the DoUTF8KeyPress method when the parent form does not have KeyPreview enabled or does not handle the character code in Key. UTF8KeyPress is not called if csNoStdEvents has been included in the ControlStyle property.

The handler routine in OnUTF8KeyPress can modify the value in the Key argument. It sets Key to an empty string ('') if the encoded value is handled in the routine.

See KeyPress for the actions performed for a character value that does not use UTF-8 encoding.

## See also

TWinControl.OnUTF8KeyPress |  | Handler for a character entered by the user.
TWinControl.OnKeyPress |  | Event handler signalled for character data entered by the user.
TWinControl.KeyPress |  | Signals the OnKeyPress event handler (when assigned).
TUTF8KeyPressEvent |  | Specifies an event handler for UTF-8-encoded key press events.