Sign in Join
FPDoc Onlineexperiment

KeyEventToString function

In unit keyboard

Return a string describing the key event.

Declaration

pascal
function KeyEventToString(KeyEvent: TKeyEvent): Shortstring

Description

KeyEventToString translates the key event in KeyEvent to a human-readable description of the pressed key. It will use the constants described in the constants section to do so.

For an example, see most other functions.

Errors

If an unknown key is passed, the scancode is returned, prefixed with the SScanCode string.

See also

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