(Deprecated)
vcCommandEvent
vcCommandEvent contains information about mouse and/or keyboard events related to the execution of commands. For example, an instance of vcCommandEvent is an argument passed to the OnInteractive event handler.
Properties
| Name | Type | Access | Description |
| EyeToMouse | vcVector | R | Gets offset (in World coordinates) from the camera eye point to the pointer on view plane. |
| Key | Integer | R | Gets either the Windows scan code for a pressed key or an offset value for a mouse wheel movement in which a negative value indicates a downward rotation of a mouse wheel. |
| MouseOnFloor | vcVector | R | Gets the position of the mouse on the layout floor (ex: Z == 0) in World coordinates. |
| MouseOnViewPlane | vcVector | R | Gets the position of the pointer on the view plane in World coordinates. |
| ShiftState | Enumeration | R | Gets the bit mask indicating which mouse buttons or modifier keys are pressed by a user. There are also bits for single and double click detection.
See Command Event Constants more for information. |
| Type | Enumeration | R | Gets the command event type.
See Command Event Constants more for information. |
| X | Integer | R | Gets the X-axis coordinate of pointer in the 3D window. |
| Y | Integer | R | Gets the Y-axis coordinate of pointer in the 3D window. |
Examples
Example. Create a keydown event for a command
|
from vcApplication import * # Copy the following code in a python command __init__.py file
cmd = getCommand() def endState(): |