Events2.TextDocumentKeyPressEvents[TextDocument] Property

Definition

Gets an event object which can be used to find key press events within a text editor.

public:
 property EnvDTE80::TextDocumentKeyPressEvents ^ TextDocumentKeyPressEvents[EnvDTE::TextDocument ^] { EnvDTE80::TextDocumentKeyPressEvents ^ get(EnvDTE::TextDocument ^ TextDocument); };
[System.Runtime.InteropServices.DispId(402)]
public EnvDTE80.TextDocumentKeyPressEvents TextDocumentKeyPressEvents[EnvDTE.TextDocument TextDocument = default] { [System.Runtime.InteropServices.DispId(402)] get; }
[<System.Runtime.InteropServices.DispId(402)>]
[<get: System.Runtime.InteropServices.DispId(402)>]
member this.TextDocumentKeyPressEvents(EnvDTE.TextDocument) : EnvDTE80.TextDocumentKeyPressEvents
Public ReadOnly Property TextDocumentKeyPressEvents(Optional TextDocument As TextDocument = Nothing) As TextDocumentKeyPressEvents

Parameters

TextDocument
TextDocument

Optional. A TextDocument object that serves as the source for the events.

Property Value

A TextDocumentKeyPressEvents object.

Attributes

Remarks

This event occurs only when printable character keys are typed, not for every key pressed on the keyboard. (For example, arrow keys and function keys do not trigger this event.)

If you need to capture non-character keypresses, the System.Windows.Forms.Control.KeyPress event triggers the System.Windows.Forms.Control.KeyDown and System.Windows.Forms.Control.KeyUp events.

Applies to