FMX.Types.IControl.KeyDown
Delphi
procedure KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState);
C++
virtual void __fastcall KeyDown(System::Word &Key, System::WideChar &KeyChar, System::Classes::TShiftState Shift) = 0 ;
Properties
| Type | Visibility | Source | Unit | Parent | 
|---|---|---|---|---|
| procedure function | public | FMX.Types.pas FMX.Types.hpp | FMX.Types | IControl | 
Description
Declares the method providing a response when a key is pressed down while the control has the keyboard focus.
Implement KeyDown to provide a certain behavior when a key is pressed down while the control has the keyboard focus.
The KeyDown parameters are:
- Keyis the scan code of the pressed keyboard key.
- KeyCharis the character code of the pressed key.
- Shiftindicates which shift keys--SHIFT, CTRL, ALT, and CMD (only for Mac)--were down when the specified key was pressed with the control in focus.
KeyDown is implemented in the TControl class. See the TControl.KeyDown description for additional details.