GetKeyEventChar

Get the character key part of a key event.

Declaration

Source position: keybrdh.inc line 171

  function GetKeyEventChar(KeyEvent: TKeyEvent) : Char;

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

Name Description
GetKeyEvent Get the next raw key event, wait if needed.
GetKeyEventCode Translate function key part of a key event code.
GetKeyEventFlags Extract the flags from a key event.
GetKeyEventShiftState Return the current state of the shift keys.
GetKeyEventUniCode Return the Unicode key event.