Xeno-rat
Loading...
Searching...
No Matches
Plugin.InputHandler Class Reference
Collaboration diagram for Plugin.InputHandler:

Static Public Member Functions

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.
 

Private Member Functions

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.
 

Static Private Attributes

const int KEYEVENTF_KEYDOWN = 0x0000
 
const int KEYEVENTF_KEYUP = 0x0002
 
const uint MOUSEEVENTF_MOVE = 0x0001
 
const uint MOUSEEVENTF_LEFTDOWN = 0x0002
 
const uint MOUSEEVENTF_LEFTUP = 0x0004
 
const uint MOUSEEVENTF_RIGHTDOWN = 0x0008
 
const uint MOUSEEVENTF_RIGHTUP = 0x0010
 
const uint MOUSEEVENTF_MIDDLEDOWN = 0x0020
 
const uint MOUSEEVENTF_MIDDLEUP = 0x0040
 
const uint MOUSEEVENTF_XDOWN = 0x0080
 
const uint MOUSEEVENTF_XUP = 0x0100
 
const uint MOUSEEVENTF_WHEEL = 0x0800
 
const uint MOUSEEVENTF_HWHEEL = 0x1000
 
const uint MOUSEEVENTF_ABSOLUTE = 0x8000
 

Member Function Documentation

◆ 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
bVkThe virtual-key code of the key to be pressed.
bScanThe hardware scan code of the key to be pressed.
dwFlagsSpecifies 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.
dwExtraInfoAn additional value associated with the key stroke.
Here is the caller graph for this function:

◆ 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
dwFlagsThe type of mouse event to be simulated, such as mouse movement, left button down, left button up, right button down, right button up, etc.
dxThe absolute position of the mouse along the x-axis.
dyThe absolute position of the mouse along the y-axis.
dwDataIf 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.
dwExtraInfoAn 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.

Here is the caller graph for this function:

◆ SetCursorPos()

static bool Plugin.InputHandler.SetCursorPos ( int x,
int y )
private

Sets the cursor position to the specified coordinates.

Parameters
xThe x-coordinate of the new cursor position.
yThe y-coordinate of the new cursor position.
Returns
True if the cursor position was successfully set; otherwise, false.
Here is the caller graph for this function:

◆ SimulateKeyPress()

static void Plugin.InputHandler.SimulateKeyPress ( int keyCode)
inlinestatic

Simulates a key press for the specified key code.

Parameters
keyCodeThe 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SimulateMouseClick()

static void Plugin.InputHandler.SimulateMouseClick ( Point screenCoords)
inlinestatic

Simulates a mouse click at the specified screen coordinates.

Parameters
screenCoordsThe 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SimulateMouseDoubleClick()

static void Plugin.InputHandler.SimulateMouseDoubleClick ( Point screenCoords)
inlinestatic

Simulates a double click of the left mouse button at the specified screen coordinates.

Parameters
screenCoordsThe 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SimulateMouseDown()

static void Plugin.InputHandler.SimulateMouseDown ( Point screenCoords)
inlinestatic

Simulates a mouse button press at the specified screen coordinates.

Parameters
screenCoordsThe 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SimulateMouseMiddleClick()

static void Plugin.InputHandler.SimulateMouseMiddleClick ( Point screenCoords)
inlinestatic

Simulates a middle mouse click at the specified screen coordinates.

Parameters
screenCoordsThe 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SimulateMouseMove()

static void Plugin.InputHandler.SimulateMouseMove ( Point screenCoords)
inlinestatic

Simulates a mouse move to the specified screen coordinates.

Parameters
screenCoordsThe 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SimulateMouseRightClick()

static void Plugin.InputHandler.SimulateMouseRightClick ( Point screenCoords)
inlinestatic

Simulates a right-click of the mouse at the specified screen coordinates.

Parameters
screenCoordsThe 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
screenCoordsThe screen coordinates where the scrolling should be simulated.
scrollAmountThe 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.

Here is the call graph for this function:

◆ SimulateMouseUp()

static void Plugin.InputHandler.SimulateMouseUp ( Point screenCoords)
inlinestatic

Simulates a mouse up event at the specified screen coordinates.

Parameters
screenCoordsThe 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.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ 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: