Respond to released key.
procedure KeyUp(var Key: Word; Shift: TShiftState); dynamic;
__fastcall KeyUp(Word Key, TShiftState Shift);
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, search virtual key codes in the Win32 Developer's Reference (WIN32.HLP).
The Shift parameter indicates whether the Shift, Alt, or Ctrl keys are combined with the keystroke.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!