KeyboardEvent Object
Collapse the table of content
Expand the table of content

KeyboardEvent Object (Visio)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

The object passed to VisEventProc as the subject of KeyDown, KeyPress, and KeyUp events.

The default property of KeyboardEvent is ToString. The ToString property returns a string that represents the properties of the KeyboardEvent object, and has the form

event code; KeyCode property value; KeyButtonState property value; KeyAscii property value; Window.Caption

where event code returns the code of the event that fired (KeyDown, KeyPress, or KeyUp) and Window.Caption returns the caption of the window that sourced the event. For example, if a user pressed the "L" key while holding down the SHIFT key, in response to the KeyPress event, ToString might return the following:


Use the Application property of the KeyboardEvent object to determine the Microsoft Visio instance hosting the object, and use the Window property to determine the Visio window associated with a keyboard event.

© 2015 Microsoft