FMX.Types.IControl.KeyDown

From RAD Studio API Documentation
Jump to: navigation, search

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:

  • Key is the scan code of the pressed keyboard key.
  • KeyChar is the character code of the pressed key.
  • Shift indicates 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.

See Also