diff --git a/Fischless.WindowsInput/IMouseSimulator.cs b/Fischless.WindowsInput/IMouseSimulator.cs index 17e56064..b6b98e62 100644 --- a/Fischless.WindowsInput/IMouseSimulator.cs +++ b/Fischless.WindowsInput/IMouseSimulator.cs @@ -18,6 +18,14 @@ public interface IMouseSimulator public IMouseSimulator LeftButtonDoubleClick(); + public IMouseSimulator MiddleButtonDown(); + + public IMouseSimulator MiddleButtonUp(); + + public IMouseSimulator MiddleButtonClick(); + + public IMouseSimulator MiddleButtonDoubleClick(); + public IMouseSimulator RightButtonDown(); public IMouseSimulator RightButtonUp(); diff --git a/Fischless.WindowsInput/MouseSimulator.cs b/Fischless.WindowsInput/MouseSimulator.cs index 75af4393..1b46713d 100644 --- a/Fischless.WindowsInput/MouseSimulator.cs +++ b/Fischless.WindowsInput/MouseSimulator.cs @@ -72,6 +72,34 @@ public class MouseSimulator : IMouseSimulator return this; } + public IMouseSimulator MiddleButtonDown() + { + User32.INPUT[] inputList = new InputBuilder().AddMouseButtonDown(MouseButton.MiddleButton).ToArray(); + SendSimulatedInput(inputList); + return this; + } + + public IMouseSimulator MiddleButtonUp() + { + User32.INPUT[] inputList = new InputBuilder().AddMouseButtonUp(MouseButton.MiddleButton).ToArray(); + this.SendSimulatedInput(inputList); + return this; + } + + public IMouseSimulator MiddleButtonClick() + { + User32.INPUT[] inputList = new InputBuilder().AddMouseButtonClick(MouseButton.MiddleButton).ToArray(); + SendSimulatedInput(inputList); + return this; + } + + public IMouseSimulator MiddleButtonDoubleClick() + { + User32.INPUT[] inputList = new InputBuilder().AddMouseButtonDoubleClick(MouseButton.MiddleButton).ToArray(); + SendSimulatedInput(inputList); + return this; + } + public IMouseSimulator RightButtonDown() { User32.INPUT[] inputList = new InputBuilder().AddMouseButtonDown(MouseButton.RightButton).ToArray();