Controls.TWinControl.KeyUp
Contents |
Delphi Information
From Controls.pas
procedure KeyUp(var Key: Word; Shift: TShiftState); dynamic;
Unit: Controls
Type: method
Visibility: protected
Member Of: TWinControl
C++ Information
From Controls.hpp
dynamic virtual void __fastcall KeyUp(unsigned short & Key, System::Set<Classes::Classes__1,0,8> Shift);
Unit: Controls
Type: method
Visibility: protected
Member Of: 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 Virtual Key Codes.
The Shift parameter indicates whether the Shift, Alt, or Ctrl keys are combined with the keystroke.