Show: Delphi C++
Display Preferences

Vcl.Controls.TWinControl.KeyUp

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure KeyUp(var Key: Word; Shift: TShiftState); dynamic;

C++

DYNAMIC void __fastcall KeyUp(System::Word &Key, System::Classes::TShiftState Shift);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TWinControl

Description

Respond to released key.

When a windowed control receives a key-up message (WM_KEYUP) from Windows, its message handler calls the DoKeyUp method. If DoKeyUp determines that the control should, in fact, process the character, it calls KeyUp, passing the key code and shift-key state to KeyUp in the Key and Shift parameters, respectively.

KeyUp calls any event handler attached to the OnKeyUp event. Override KeyUp to provide other responses in addition to the event-handler call.

Either KeyUp or the OnKeyUp event handler it calls can suppress further processing of a key by setting the Key parameter to zero.

The Key parameter is the key on the keyboard. For non-alphanumeric keys, use WinAPI virtual key codes to determine the key pressed. For more information, see Representing Keys and Shortcuts.

The Shift parameter indicates whether the Shift, Alt, or Ctrl keys are combined with the keystroke.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance