[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
OnKeyPress - event controller for a key being pressed while the control has focus. To properly handle national chars use UTF8KeyPress instead.
Source position: controls.pp line 1897
public property TWinControl.OnKeyPress: TKeyPressEvent |
OnKeyPress - event controller for a key being pressed while the control has focus
Differs from OnKeyDown in that the key needs to become pressed while the control has focus; with OnKeyDown the key may have already been down when the control received focus.
Note: we recommend you to use OnUTF8KeyPress to prevent data lost. National chars are converted from UTF8 to the system encoding in OnKeyPressEvent. This can cause a data lost if symbol cannot be converted, which means OnKeyPress is not called or with Char=#0. OnUTF8KeyPress does not perform this conversion.
lazarus-ccr.sourceforge.net |