Skip to content

OnKeyPress

event

Delphi
property OnKeyPress: TOnVideoKeyPress read FOnKeyPress write FOnKeyPress;
C++Builder
__property TOnVideoKeyPress OnKeyPress = {read=FOnKeyPress, write=FOnKeyPress};
typedef void __fastcall (__closure *TOnVideoKeyPress)(System::TObject* Sender, System::LongInt VideoWindow, System::WideChar &Key, System::LongInt PhysicalKey, System::Classes::TShiftState ShiftState);
C++/Qt
void SetOnKeyPress (TOnKeyPressCb OnKeyPressCb);
typedef void CALLBACK TOnKeyPressCb (void *Object, void *Sender, int VideoWindow, char *Key, int PhysicalKey, int ShiftState);

This TOnVideoKeyPress event occurs when keys are pressed on a video window that has the control. Useful mainly when the video window is not attached to the control (Display_embedded disabled), to receive key events from the window.