_Added in 4.3_ */mouse <@window> * Triggers a [[Scripting_Menus#Mouse-events|Mouse Event]] with the specified parameters. *Parameters* table(ktable). |*Parameter*|*Description*| | @window | The window to trigger the mouse event for. | | event | The [[Scripting_Menus#Mouse-events|Mouse Event]] to trigger. | | mouse.x | The [[$mouse]].x coordinates to trigger at. | | mouse.y | The [[$mouse]].y coordinates to trigger at. | | mouse.key | The [[$mouse]].key flag to trigger with. | *Events* table(ktable). |*Event*|*Value*| | None | 0 | | Mouse | 1 | | SIngleClick | 2 | | MiddleClick | 3 | | DoubleClick | 4 | | DoubleMiddleclick | 5 | | UpClick | 6 | | UpMiddleClick | 7 | | RightClick | 8 | | DoubleRightClick | 9 | | ListBoxClick | 10 | | Leave | 11 | | Drop | 12 | | WheelUp | 13 | | WheelDown | 14 | | Resize | 15 | | Minimize | 16 | | Maximize | 17 | | Restore | 18 | *Example*
; Create a mouse event for '@window'.
menu @window {
  mouse:{
    echo -ag mouse.x is $mouse.x mouse.y is $mouse.y mouse.key is $mouse.key
  }
}

alias testmouse {
  ; Create a custom window named '@window'.
  /window @window

  ; Call the mouse event for '@window'.
  /mouse @window 1 42 42 0
}