DataMouseSensor

graphics/plugins_datamousesensor-icon.png

DataMouseSensor plugin receives mouse events and keyboard events from Viz and stores the events in special DataPool Variables, making this information accessible to other DataPool plugins.

The variables that it creates are:

  • MPOS: returns the mouse position when a button is clicked. If a button is pressed while moving the cursor MPOS will update dynamically. When the button is released the mouse position value will be stored in MPOS. The position is displayed in X Y values.

  • MBUT: returns the number of the last clicked mouse button (1=left), whether the button is currently pressed or released, and the X Y values like in MPOS.

  • MSELCONT: returns the ID of the selected container.

  • KEY: returns the ascii code of the last pressed key on the keyboard and whether it’s currently pressed or not (pressed=1, released=0).

    Note: Not all keyboard buttons will be displayed when using the KEY variable.

  • MONOFF: indicates whether a mouse button is currently clicked or released.

  • MBUTTON: returns the number of the last clicked mouse button. 1=left button, 2=center button, 3=right button.

The DataMouseSensor is a scene plugin and it should be used in scenes that use mouse/keyboard DataPool plugins.

DataMouseSensor plugin has no parameters.