FMX.Controls.TControl.KeyUp
Delphi
procedure KeyUp(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); virtual;
C++
virtual void __fastcall KeyUp(System::Word &Key, System::WideChar &KeyChar, System::Classes::TShiftState Shift);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | FMX.Controls.pas FMX.Controls.hpp |
FMX.Controls | TControl |
Description
OnKeyUp event dispatcher.
KeyUp provides a response when a key is released while the control has keyboard focus. KeyUp calls the OnKeyUp event handler if one is assigned.
A control calls KeyUp in response to any key-up messages, decoding the message parameters into the key code, character code, and shift state. The control passes them in the Key
, KeyChar
, and Shift
parameters, respectively:
Key
is the scan code of the released keyboard key.KeyChar
is the character code of the released key.Shift
indicates which shift keys--SHIFT, CTRL, ALT, and CMD (only for Mac)--were down when you release the previously pressed key with the control in focus.
Override the protected KeyUp method to provide other responses when a key is released while the control has a keyboard input focus.
Warning: When using a virtual (on-screen) keyboard on Android devices, do not rely on KeyEvents to detect pressed keys, especially text characters. However, KeyEvents detects keys such as
return
and enter
but it does not delete
, depending on the target application. Be aware that other software input methods may never send KeyEvents regardless of the version.