FMX.Controls.TControl.KeyUp

From RAD Studio API Documentation
Jump to: navigation, search

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 keyboard input focus.

See Also