.. role:: ts-api-decorator

###############
MouseInputEvent
###############

.. js:module:: Event
   :noindex:

.. container:: ts-api-section

   .. js:class:: MouseInputEvent



.. container:: api-index-section

   .. rubric:: Constructors

   .. rst-class:: api-index-list-item api-kind-constructor api-parent-kind-class

   * :js:meth:`~Event.MouseInputEvent.constructor`



.. container:: api-index-section

   .. rubric:: Accessors

   .. rst-class:: api-index-list-item api-kind-accessor api-parent-kind-class

   * :js:attr:`~Event.MouseInputEvent.viewKey`



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~Event.MouseInputEvent.altDown`
   * :js:meth:`~Event.MouseInputEvent.commandDown`
   * :js:meth:`~Event.MouseInputEvent.controlDown`
   * :js:meth:`~Event.MouseInputEvent.getButton`
   * :js:meth:`~Event.MouseInputEvent.getButtons`
   * :js:meth:`~Event.MouseInputEvent.getDate`
   * :js:meth:`~Event.MouseInputEvent.getEventType`
   * :js:meth:`~Event.MouseInputEvent.getHandled`
   * :js:meth:`~Event.MouseInputEvent.getModifiers`
   * :js:meth:`~Event.MouseInputEvent.getPosition`
   * :js:meth:`~Event.MouseInputEvent.setHandled`
   * :js:meth:`~Event.MouseInputEvent.shiftDown`





------------

Constructors
============

.. container:: ts-api-section

   .. js:function:: MouseInputEvent.constructor( positionX, positionY, button, buttons, modifiers, inputType, viewKey)

      :param positionX: X window position of the mouse
      :type positionX: number
      :param positionY: Y window position of the mouse
      :type positionY: number
      :param button: mouse button associated with this event
      :type button: Button
      :param buttons: mouse buttons currently pressed with this event
      :type buttons: Buttons
      :param modifiers: bitwise collection of values from KeyModifiers enum
      :type modifiers: KeyModifiers
      :param inputType: the type of the event
      :type inputType: MouseInputType
      :param viewKey: None
      :type viewKey: ViewKey


      Mouse Event class


      :rtype: MouseInputEvent



Accessors
=========

.. container:: ts-api-section

   .. js:function:: viewKey()
      :noindex:



      Get the ViewKey this event is associated with.


      :rtype: ViewKey



Methods
=======

.. rst-class:: ts-api-section

altDown
-------

.. js:method:: MouseInputEvent.altDown()



   gets the state of the alt key

   :returns: whether the alt key was down when this event was generated


   :rtype: boolean

.. rst-class:: ts-api-section

commandDown
-----------

.. js:method:: MouseInputEvent.commandDown()



   gets the state of the command key

   :returns: whether the command key was down when this event was generated


   :rtype: boolean

.. rst-class:: ts-api-section

controlDown
-----------

.. js:method:: MouseInputEvent.controlDown()



   gets the state of the control key

   :returns: whether the control key was down when this event was generated


   :rtype: boolean

.. rst-class:: ts-api-section

getButton
---------

.. js:method:: MouseInputEvent.getButton()



   gets the mouse button associated with this event

   :returns: the mouse button for this event


   :rtype: Button

.. rst-class:: ts-api-section

getButtons
----------

.. js:method:: MouseInputEvent.getButtons()



   gets the mouse buttons currently pressed with this event

   :returns: the mouse buttons currently pressed for this event


   :rtype: Buttons

.. rst-class:: ts-api-section

getDate
-------

.. js:method:: MouseInputEvent.getDate()



   Gets the Date this event occurred

   :returns: the event Date


   :rtype: Date

.. rst-class:: ts-api-section

getEventType
------------

.. js:method:: MouseInputEvent.getEventType()



   gets the event type

   :returns: the type of mouse event


   :rtype: MouseInputType

.. rst-class:: ts-api-section

getHandled
----------

.. js:method:: MouseInputEvent.getHandled()



   Gets the handled state of the event

   :returns: whether the event has been handled


   :rtype: boolean

.. rst-class:: ts-api-section

getModifiers
------------

.. js:method:: MouseInputEvent.getModifiers()



   gets the event modifiers

   :returns: bitwise combination of KeyModifiers


   :rtype: KeyModifiers

.. rst-class:: ts-api-section

getPosition
-----------

.. js:method:: MouseInputEvent.getPosition()



   gets the window position of the mouse pointer for this event

   :returns: the mouse position for this event


   :rtype: Point2

.. rst-class:: ts-api-section

setHandled
----------

.. js:method:: MouseInputEvent.setHandled( handled)

   :param handled: Indicates whether this event has been handled.
   :type handled: boolean


   Sets the handled state of the event. When an event has been handled it will not propagate any further


   :rtype: void

.. rst-class:: ts-api-section

shiftDown
---------

.. js:method:: MouseInputEvent.shiftDown()



   gets the state of the shift key

   :returns: whether the shift key was down when this event was generated


   :rtype: boolean

