# MouseInputEvent

class Event.MouseInputEvent()

Constructors

- `constructor()`

Accessors

- `viewKey`

Methods

- `altDown()`

- `commandDown()`

- `controlDown()`

- `getButton()`

- `getButtons()`

- `getDate()`

- `getEventType()`

- `getHandled()`

- `getModifiers()`

- `getPosition()`

- `setHandled()`

- `shiftDown()`

## Constructors

MouseInputEvent.constructor(positionX, positionY, button, buttons, modifiers, inputType, viewKey)
  Arguments

    - positionX (`number()`) – X window position of the mouse

    - positionY (`number()`) – Y window position of the mouse

    - button (`Button()`) – mouse button associated with this event

    - buttons (`Buttons()`) – mouse buttons currently pressed with this event

    - modifiers (`KeyModifiers()`) – bitwise collection of values from KeyModifiers enum

    - inputType (`MouseInputType()`) – the type of the event

    - viewKey (`ViewKey()`) – None

  Mouse Event class

  Return type

    MouseInputEvent

## Accessors

Event.viewKey()

  Get the ViewKey this event is associated with.

  Return type

    ViewKey

## Methods

### altDown

MouseInputEvent.altDown()

  gets the state of the alt key

  Returns

    whether the alt key was down when this event was generated

  Return type

    boolean

### commandDown

MouseInputEvent.commandDown()

  gets the state of the command key

  Returns

    whether the command key was down when this event was generated

  Return type

    boolean

### controlDown

MouseInputEvent.controlDown()

  gets the state of the control key

  Returns

    whether the control key was down when this event was generated

  Return type

    boolean

### getButton

MouseInputEvent.getButton()

  gets the mouse button associated with this event

  Returns

    the mouse button for this event

  Return type

    Button

### getButtons

MouseInputEvent.getButtons()

  gets the mouse buttons currently pressed with this event

  Returns

    the mouse buttons currently pressed for this event

  Return type

    Buttons

### getDate

MouseInputEvent.getDate()

  Gets the Date this event occurred

  Returns

    the event Date

  Return type

    Date

### getEventType

MouseInputEvent.getEventType()

  gets the event type

  Returns

    the type of mouse event

  Return type

    MouseInputType

### getHandled

MouseInputEvent.getHandled()

  Gets the handled state of the event

  Returns

    whether the event has been handled

  Return type

    boolean

### getModifiers

MouseInputEvent.getModifiers()

  gets the event modifiers

  Returns

    bitwise combination of KeyModifiers

  Return type

    KeyModifiers

### getPosition

MouseInputEvent.getPosition()

  gets the window position of the mouse pointer for this event

  Returns

    the mouse position for this event

  Return type

    Point2

### setHandled

MouseInputEvent.setHandled(handled)
  Arguments

    - handled (`boolean()`) – Indicates whether this event has been handled.

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

  Return type

    void

### shiftDown

MouseInputEvent.shiftDown()

  gets the state of the shift key

  Returns

    whether the shift key was down when this event was generated

  Return type

    boolean