SPYVirtualKeyMask

www.altova.com Imprimir este apartado Página anterior Subir un nivel Página siguiente

Inicio >  Referencia del programador > Application API > Enumerations >

SPYVirtualKeyMask

Description

Enumeration type for the most frequently used key masks that identify the status of the virtual keys. Use these values as bitmasks rather then directly comparing with them. When necessary, you can create further masks by using the 'logical or' operator.

 

Examples

 

'  VBScript sample: check if ctrl-key is pressed

If ((i_nVirtualKeyStatus And spyCtrlKeyMask) <> 0)) Then

 ' ctrl-key is pressed

End If

 

'  VBScript sample: check if ONLY ctrl-key is pressed

If (i_nVirtualKeyStatus == spyCtrlKeyMask) Then

 ' exactly ctrl-key is pressed

End If

 

// JScript sample: check if any of the right virtual keys is pressed

if ((i_nVirtualKeyStatus & (spyRightShiftKeyMask | spyRightCtrlKeyMask | spyRightAltKeyMask)) != 0)

{

 ; ' right virtual key is pressed

}

 

Possible values:


spyNoVirtualKeyMask

= 0


spyLeftShiftKeyMask

= 1


spyRightShiftKeyMask

= 2


spyLeftCtrlKeyMask

= 4


spyRightCtrlKeyMask

= 8


spyLeftAltKeyMask

= 16


spyRightAltKeyMask

= 32


spyShiftKeyMask

= 3        // spyLeftShiftKeyMask | spyRightShiftKeyMask


spyCtrlKeyMask

= 12        // spyLeftCtrlKeyMask | spyRightCtrlKeyMask


spyAltKeyMask

= 48        // spyLeftAltKeyMask | spyRightAltKeyMask


© 2019 Altova GmbH