Sign in Join
FPDoc Onlineexperiment

GetKeyEventChar function

In unit keyboard

Get the character key part of a key event.

Declaration

pascal
function GetKeyEventChar(KeyEvent: TKeyEvent): AnsiChar

Description

GetKeyEventChar returns the charcode part of the given KeyEvent, if it contains a translated character key keycode. The charcode is simply the ascii code of the character key that was pressed.

It returns the null character if the key was not a character key, but e.g. a function key.

For an example, see GetKeyEvent

Errors

None.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.