property OnKeyPress: TKeyPressEvent;
Fired for each character generated by the keyboard. The Sender parameter references the TPdfView instance à l’origine de l’événement, afin qu’un seul gestionnaire puisse servir plusieurs vues en inspectant Sender.
Typical uses include: filter or transform typed characters before they reach text-selection or form-field handlers. Because the handler runs on the VCL main thread, you can update form controls and call other VCL APIs directly.
Les gestionnaires doivent répondre rapidement — le rendu PDFium et le remplissage de formulaires s’exécutent sur le même thread, et tout délai ici retarde le prochain rafraîchissement de la page
TabStop to True if you want this control to participate in tab-key focus traversal so that keyboard events are delivered.PdfView1.OnKeyPress := MyHandler.Set Cursor / Set Caret calls on TPdfView to keep visual feedback synchronized.
procedure TForm1.PdfViewOnKeyPress(Sender: TObject; var Key: Char);
begin
// filter or transform typed characters before they reach text-selection or form-field handlers
Caption := Format('OnKeyPress on page %d', [PdfView1.PageNumber]);
end;