Altova XMLSpy 2025 Enterprise Edition

Event: OnKeyboardEvent (eKeyEvent as SPYKeyEvent, nKeyCode as Long, nVirtualKeyStatus as Long) as Boolean

 

Scripting environment - VBScript:

Function On_AuthenticKeyboardEvent(eKeyEvent, nKeyCode, nVirtualKeyStatus)

 ' On_AuthenticKeyboardEvent = True  ' to cancel bubbling of event

End Function

 

Scripting environment - JScript:

function On_AuthenticKeyboardEvent(eKeyEvent, nKeyCode, nVirtualKeyStatus)

{

 // return true;  /* to cancel bubbling of event */

}

 

IDE Plugin:

IXMLSpyPlugIn.OnEvent (30, ...)        // nEventId = 30

 

Description

This event gets triggered for WM_KEYDOWN, WM_KEYUP and WM_CHAR Windows messages.

 

The actual message type is available in the eKeyEvent parameter. The status of virtual keys is combined in the parameter nVirtualKeyStatus. Use the bit-masks defined in the enumeration datatype SPYVirtualKeyMask, to test for the different keys or their combinations.

© 2018-2024 Altova GmbH