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

TWinControl.OnKeyUp

Event handler signalled when a key up event has occurred for the control.

Declaration

Source position: controls.pp line 2361

public property TWinControl.OnKeyUp : TKeyEvent
  read FOnKeyUp
  write FOnKeyUp;

Description

OnKeyUp is a TKeyEvent property with the event handler signalled when a key up event has occurred in the control. OnKeyUp is signalled (when assigned) from the KeyUp method. It occurs when the CN_KEYUP or CN_SYSKEYUP notifications are handled for the control.

The Sender argument contains the control for the key event. It must be cast to TControl or TwinControl type to access properties or methods specific to the descendent classes.

The Key argument contains the virtual keyboard constant for the key event (like VK_F1 or VK_NUMPAD5).

Shift is a set type which contains the modifiers for the key down event like: Ctrl, Shift, Alt, or Meta.

Unlike OnKeyDown, this event occurs only once for auto-repeated keys. For more information, see TWinControl.OnKeyDown.

Use OnKeyDown to perform actions needed when a key down event for a non-printable key is received for the control.

Use OnKeyPress to handle a key press for printable characters entered into the control.

See also

TWinControl.KeyUp

  

Signals the OnKeyUp event handler (when assigned).

TWinControl.CNSysKeyUp

  

Handler for a system key released notification; the message is handled by DoKeyUpBeforeInterface by default.

TWinControl.CNKeyUp

  

Handler for a key released notification; the message is handled by DoKeyUpBeforeInterface by default.

TWinControl.OnKeyDown

  

Event handler signalled for key down keyboard events.

TWinControl.OnKeyPress

  

Event handler signalled for character data entered by the user.

TKeyEvent

  

Defines an event handler for key events.


Version 3.2 Generated 2024-02-25 Home