C# Class Interceptor.Input

Show file Open project: jasonpang/Interceptor Class Usage Examples

Public Methods

Method Description
Input ( ) : System
Load ( ) : bool
MoveMouseBy ( int deltaX, int deltaY, bool useDriver = false ) : void

Warning: This function, if using the driver, does not function reliably and often moves the mouse in unpredictable vectors. An alternate version uses the standard Win32 API to get the current cursor's position, calculates the desired destination's offset, and uses the Win32 API to set the cursor to the new position.

MoveMouseTo ( int x, int y, bool useDriver = false ) : void

Warning: This function, if using the driver, does not function reliably and often moves the mouse in unpredictable vectors. An alternate version uses the standard Win32 API to set the cursor's position and does not use the driver.

ScrollMouse ( ScrollDirection direction ) : void
SendKey ( Keys key ) : void

Warning: Do not use this overload of SendKey() for non-letter, non-number, or non-ENTER keys. It may require a special KeyState of not KeyState.Down or KeyState.Up, but instead KeyState.E0 and KeyState.E1.

SendKey ( Keys key, KeyState state ) : void
SendKeys ( ) : void
SendLeftClick ( ) : void
SendMouseEvent ( MouseState state ) : void
SendRightClick ( ) : void
SendText ( string text ) : void

Warning: Only use this overload for sending letters, numbers, and symbols (those to the right of the letters on a U.S. keyboard and those obtained by pressing shift-#). Do not send special keys like Tab or Control or Enter.

Unload ( ) : void

Private Methods

Method Description
CharacterToKeysEnum ( char c ) : bool>.Tuple

Converts a character to a Keys enum and a 'do we need to press shift'.

DriverCallback ( ) : void

Method Details

Input() public method

public Input ( ) : System
return System

Load() public method

public Load ( ) : bool
return bool

MoveMouseBy() public method

Warning: This function, if using the driver, does not function reliably and often moves the mouse in unpredictable vectors. An alternate version uses the standard Win32 API to get the current cursor's position, calculates the desired destination's offset, and uses the Win32 API to set the cursor to the new position.
public MoveMouseBy ( int deltaX, int deltaY, bool useDriver = false ) : void
deltaX int
deltaY int
useDriver bool
return void

MoveMouseTo() public method

Warning: This function, if using the driver, does not function reliably and often moves the mouse in unpredictable vectors. An alternate version uses the standard Win32 API to set the cursor's position and does not use the driver.
public MoveMouseTo ( int x, int y, bool useDriver = false ) : void
x int
y int
useDriver bool
return void

ScrollMouse() public method

public ScrollMouse ( ScrollDirection direction ) : void
direction ScrollDirection
return void

SendKey() public method

Warning: Do not use this overload of SendKey() for non-letter, non-number, or non-ENTER keys. It may require a special KeyState of not KeyState.Down or KeyState.Up, but instead KeyState.E0 and KeyState.E1.
public SendKey ( Keys key ) : void
key Keys
return void

SendKey() public method

public SendKey ( Keys key, KeyState state ) : void
key Keys
state KeyState
return void

SendKeys() public method

public SendKeys ( ) : void
return void

SendLeftClick() public method

public SendLeftClick ( ) : void
return void

SendMouseEvent() public method

public SendMouseEvent ( MouseState state ) : void
state MouseState
return void

SendRightClick() public method

public SendRightClick ( ) : void
return void

SendText() public method

Warning: Only use this overload for sending letters, numbers, and symbols (those to the right of the letters on a U.S. keyboard and those obtained by pressing shift-#). Do not send special keys like Tab or Control or Enter.
public SendText ( string text ) : void
text string
return void

Unload() public method

public Unload ( ) : void
return void