procedure KeyUp(var Key: Word; var KeyChar: System.WideChar; Shift: TShiftState); virtual;
virtual void __fastcall KeyUp(System::Word &Key, System::WideChar &KeyChar, System::Classes::TShiftState Shift);
Is executed each time when a key is released while this form has the input focus.
First, KeyUp calls the OnKeyUp event handler (if one is defined) of the control having input focus, then KeyUp calls the OnKeyUp event handler. In the finally block, KeyUp stores the current date and time in the LastKeyPress and LastUserActive properties of the current application.
KeyUp has the following parameters:
Keyis the scan code of the pressed keyboard key. The UITypes unit defines Virtual Keys providing symbolic constants for scan codes of keyboard keys.
KeyCharis the character representation of the pressed key.
Shiftdetermines the state of the CTRL, ALT, SHIFT, and CMD (only for Mac) keys at the moment you press the key.
You can override KeyUp to provide additional ways to handle keys in subclasses.