|
static void | SimulateMouseClick (Point screenCoords) |
| Simulates a mouse click at the specified screen coordinates.
|
|
static void | SimulateMouseDoubleClick (Point screenCoords) |
| Simulates a double click of the left mouse button at the specified screen coordinates.
|
|
static void | SimulateMouseDown (Point screenCoords) |
| Simulates a mouse button press at the specified screen coordinates.
|
|
static void | SimulateMouseUp (Point screenCoords) |
| Simulates a mouse up event at the specified screen coordinates.
|
|
static void | SimulateMouseMove (Point screenCoords) |
| Simulates a mouse move to the specified screen coordinates.
|
|
static void | SimulateMouseRightClick (Point screenCoords) |
| Simulates a right-click of the mouse at the specified screen coordinates.
|
|
static void | SimulateMouseScroll (Point screenCoords, int scrollAmount) |
| Simulates mouse scrolling at the specified screen coordinates by the given scroll amount.
|
|
static void | SimulateMouseMiddleClick (Point screenCoords) |
| Simulates a middle mouse click at the specified screen coordinates.
|
|
static void | SimulateKeyPress (int keyCode) |
| Simulates a key press for the specified key code.
|
|
|
static bool | SetCursorPos (int x, int y) |
| Sets the cursor position to the specified coordinates.
|
|
static void | mouse_event (uint dwFlags, uint dx, uint dy, uint dwData, IntPtr dwExtraInfo) |
| Simulates mouse input by moving the cursor to the specified coordinates or by generating mouse button clicks and wheel scrolls.
|
|
static void | keybd_event (byte bVk, byte bScan, int dwFlags, int dwExtraInfo) |
| Simulates a keyboard event by generating a sequence of key-down and key-up messages for a specified virtual key.
|
|
◆ keybd_event()
static void Plugin.InputHandler.keybd_event |
( |
byte | bVk, |
|
|
byte | bScan, |
|
|
int | dwFlags, |
|
|
int | dwExtraInfo ) |
|
private |
Simulates a keyboard event by generating a sequence of key-down and key-up messages for a specified virtual key.
- Parameters
-
bVk | The virtual-key code of the key to be pressed. |
bScan | The hardware scan code of the key to be pressed. |
dwFlags | Specifies various aspects of function operation. This parameter can be a combination of the following flag values: KEYEVENTF_EXTENDEDKEY, KEYEVENTF_KEYUP, KEYEVENTF_SCANCODE, and KEYEVENTF_UNICODE. |
dwExtraInfo | An additional value associated with the key stroke. |
◆ mouse_event()
static void Plugin.InputHandler.mouse_event |
( |
uint | dwFlags, |
|
|
uint | dx, |
|
|
uint | dy, |
|
|
uint | dwData, |
|
|
IntPtr | dwExtraInfo ) |
|
private |
Simulates mouse input by moving the cursor to the specified coordinates or by generating mouse button clicks and wheel scrolls.
- Parameters
-
dwFlags | The type of mouse event to be simulated, such as mouse movement, left button down, left button up, right button down, right button up, etc. |
dx | The absolute position of the mouse along the x-axis. |
dy | The absolute position of the mouse along the y-axis. |
dwData | If dwFlags contains MOUSEEVENTF_WHEEL, then dwData specifies the amount of wheel movement. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. |
dwExtraInfo | An additional value associated with the mouse event. |
This method simulates mouse input by calling the mouse_event function from the user32.dll library. It can be used to perform various mouse-related actions, such as moving the cursor to specific coordinates, clicking mouse buttons, and scrolling the mouse wheel.
◆ SetCursorPos()
static bool Plugin.InputHandler.SetCursorPos |
( |
int | x, |
|
|
int | y ) |
|
private |
Sets the cursor position to the specified coordinates.
- Parameters
-
x | The x-coordinate of the new cursor position. |
y | The y-coordinate of the new cursor position. |
- Returns
- True if the cursor position was successfully set; otherwise, false.
◆ SimulateKeyPress()
static void Plugin.InputHandler.SimulateKeyPress |
( |
int | keyCode | ) |
|
|
inlinestatic |
Simulates a key press for the specified key code.
- Parameters
-
keyCode | The virtual-key code of the key to be pressed. |
This method simulates a key press by sending a key-down event followed by a key-up event for the specified key code.
◆ SimulateMouseClick()
static void Plugin.InputHandler.SimulateMouseClick |
( |
Point | screenCoords | ) |
|
|
inlinestatic |
Simulates a mouse click at the specified screen coordinates.
- Parameters
-
screenCoords | The screen coordinates where the mouse click should be simulated. |
This method sets the cursor position to the specified screen coordinates using the SetCursorPos function. It then simulates a left mouse button down event followed by a left mouse button up event using the mouse_event function, effectively simulating a mouse click at the specified screen coordinates.
◆ SimulateMouseDoubleClick()
static void Plugin.InputHandler.SimulateMouseDoubleClick |
( |
Point | screenCoords | ) |
|
|
inlinestatic |
Simulates a double click of the left mouse button at the specified screen coordinates.
- Parameters
-
screenCoords | The screen coordinates where the double click should be simulated. |
This method simulates a double click of the left mouse button at the specified screen coordinates by first setting the cursor position to the given coordinates using SetCursorPos method. Then, it simulates the left mouse button down event followed by the left mouse button up event, and repeats the same sequence to simulate a double click.
◆ SimulateMouseDown()
static void Plugin.InputHandler.SimulateMouseDown |
( |
Point | screenCoords | ) |
|
|
inlinestatic |
Simulates a mouse button press at the specified screen coordinates.
- Parameters
-
screenCoords | The screen coordinates where the mouse button press should be simulated. |
This method sets the cursor position to the specified screen coordinates using the SetCursorPos function. It then simulates a left mouse button press at the current cursor position using the mouse_event function with the MOUSEEVENTF_LEFTDOWN flag.
◆ SimulateMouseMiddleClick()
static void Plugin.InputHandler.SimulateMouseMiddleClick |
( |
Point | screenCoords | ) |
|
|
inlinestatic |
Simulates a middle mouse click at the specified screen coordinates.
- Parameters
-
screenCoords | The screen coordinates where the middle mouse click should be simulated. |
This method sets the cursor position to the specified screen coordinates using the SetCursorPos function. It then simulates a middle mouse button down event using the mouse_event function with the MOUSEEVENTF_MIDDLEDOWN flag. After that, it simulates a middle mouse button up event using the mouse_event function with the MOUSEEVENTF_MIDDLEUP flag.
◆ SimulateMouseMove()
static void Plugin.InputHandler.SimulateMouseMove |
( |
Point | screenCoords | ) |
|
|
inlinestatic |
Simulates a mouse move to the specified screen coordinates.
- Parameters
-
screenCoords | The screen coordinates to move the mouse to. |
This method simulates a mouse move to the specified screen coordinates using the SetCursorPos function from the Windows API.
◆ SimulateMouseRightClick()
static void Plugin.InputHandler.SimulateMouseRightClick |
( |
Point | screenCoords | ) |
|
|
inlinestatic |
Simulates a right-click of the mouse at the specified screen coordinates.
- Parameters
-
screenCoords | The screen coordinates where the right-click should be simulated. |
This method sets the cursor position to the specified screen coordinates using the SetCursorPos function. It then simulates a right mouse button down event using the mouse_event function with the MOUSEEVENTF_RIGHTDOWN flag, followed by a right mouse button up event using the mouse_event function with the MOUSEEVENTF_RIGHTUP flag.
◆ SimulateMouseScroll()
static void Plugin.InputHandler.SimulateMouseScroll |
( |
Point | screenCoords, |
|
|
int | scrollAmount ) |
|
inlinestatic |
Simulates mouse scrolling at the specified screen coordinates by the given scroll amount.
- Parameters
-
screenCoords | The screen coordinates where the scrolling should be simulated. |
scrollAmount | The amount of scrolling to be simulated. |
This method simulates mouse scrolling at the specified screen coordinates by generating a mouse wheel event with the given scroll amount. The scroll amount is converted to scroll lines based on the standard WHEEL_DELTA value of 120, and the mouse wheel event is triggered using the WinAPI function mouse_event.
◆ SimulateMouseUp()
static void Plugin.InputHandler.SimulateMouseUp |
( |
Point | screenCoords | ) |
|
|
inlinestatic |
Simulates a mouse up event at the specified screen coordinates.
- Parameters
-
screenCoords | The screen coordinates where the mouse up event should be simulated. |
This method sets the cursor position to the specified screen coordinates and simulates a left mouse button release event using the mouse_event function from the Windows API.
◆ KEYEVENTF_KEYDOWN
const int Plugin.InputHandler.KEYEVENTF_KEYDOWN = 0x0000 |
|
staticprivate |
◆ KEYEVENTF_KEYUP
const int Plugin.InputHandler.KEYEVENTF_KEYUP = 0x0002 |
|
staticprivate |
◆ MOUSEEVENTF_ABSOLUTE
const uint Plugin.InputHandler.MOUSEEVENTF_ABSOLUTE = 0x8000 |
|
staticprivate |
◆ MOUSEEVENTF_HWHEEL
const uint Plugin.InputHandler.MOUSEEVENTF_HWHEEL = 0x1000 |
|
staticprivate |
◆ MOUSEEVENTF_LEFTDOWN
const uint Plugin.InputHandler.MOUSEEVENTF_LEFTDOWN = 0x0002 |
|
staticprivate |
◆ MOUSEEVENTF_LEFTUP
const uint Plugin.InputHandler.MOUSEEVENTF_LEFTUP = 0x0004 |
|
staticprivate |
◆ MOUSEEVENTF_MIDDLEDOWN
const uint Plugin.InputHandler.MOUSEEVENTF_MIDDLEDOWN = 0x0020 |
|
staticprivate |
◆ MOUSEEVENTF_MIDDLEUP
const uint Plugin.InputHandler.MOUSEEVENTF_MIDDLEUP = 0x0040 |
|
staticprivate |
◆ MOUSEEVENTF_MOVE
const uint Plugin.InputHandler.MOUSEEVENTF_MOVE = 0x0001 |
|
staticprivate |
◆ MOUSEEVENTF_RIGHTDOWN
const uint Plugin.InputHandler.MOUSEEVENTF_RIGHTDOWN = 0x0008 |
|
staticprivate |
◆ MOUSEEVENTF_RIGHTUP
const uint Plugin.InputHandler.MOUSEEVENTF_RIGHTUP = 0x0010 |
|
staticprivate |
◆ MOUSEEVENTF_WHEEL
const uint Plugin.InputHandler.MOUSEEVENTF_WHEEL = 0x0800 |
|
staticprivate |
◆ MOUSEEVENTF_XDOWN
const uint Plugin.InputHandler.MOUSEEVENTF_XDOWN = 0x0080 |
|
staticprivate |
◆ MOUSEEVENTF_XUP
const uint Plugin.InputHandler.MOUSEEVENTF_XUP = 0x0100 |
|
staticprivate |
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/ScreenControl/ScreenControl.cs