DPB1Class · Game state and actions

LokiPoe.Input

Class to interact with the game using keyboard.

Namespace: DreamPoeBot.Loki.Game

public class LokiPoe.InputView DPB2 version →

Members and overloads

29 results

WM_PASTE

FieldLink ↗
public const int LokiPoe.Input.WM_PASTE = 770

Gets wm paste for Input.

Input

MethodLink ↗
public LokiPoe.Input.Input()

Creates a new Input instance.

ClickLMB

MethodLink ↗
public static void LokiPoe.Input.ClickLMB(int cx = 0, int cy = 0)

Click the left mouse button, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

ClickMMB

MethodLink ↗
public static void LokiPoe.Input.ClickMMB(int cx = 0, int cy = 0)

Click the middle mouse button, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

ClickRMB

MethodLink ↗
public static void LokiPoe.Input.ClickRMB(int cx = 0, int cy = 0)

Click the right mouse button, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

DblClickLMB

MethodLink ↗
public static void LokiPoe.Input.DblClickLMB(int cx = 0, int cy = 0)

Double Click the left mouse button, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

DblClickMMB

MethodLink ↗
public static void LokiPoe.Input.DblClickMMB(int cx = 0, int cy = 0)

Double Click the middle mouse button, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

DblClickRMB

MethodLink ↗
public static void LokiPoe.Input.DblClickRMB(int cx = 0, int cy = 0)

Double Click the right mouse button, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

GetClickableHighlightLabelDimensions

MethodLink ↗
public static bool LokiPoe.Input.GetClickableHighlightLabelDimensions(NetworkObject obj, out Vector2 coords, out Vector2 size, bool onlyVisible = true)

Return the position and dimension of a NetworkObject label, or Vector2.Zero if the lebel is not visible.

objNetworkObject
The NetworkObject to analize
coordsVector2
The position of the label or Vector2.Zero if no lable are visible.
sizeVector2
The dimensions of the label or Vector2.Zero if no lable are visible.
onlyVisiblebool
If set to true, only object on screen will return a out value.

Returns: Return true if a visible lable is found.

GetClickableHighlightLabelPosition

MethodLink ↗
public static Vector2 LokiPoe.Input.GetClickableHighlightLabelPosition(NetworkObject obj, bool onlyVisible = true)

Return the position of a NetworkObject label, or Vector2.Zero if the lebel is not visible.

objNetworkObject
The NetworkObject to analize
onlyVisiblebool
If set to true, only object on screen will return a position.

Returns: A Vector2 rapresenting the position of the label.

GetKeyForAction

MethodLink ↗
public static bool LokiPoe.Input.GetKeyForAction(string action, out Keys key)

Retrieve the currently configured key for a specifig game action. the string passed must be in the same exact form as show in the game options. Ex: "Atlas Screen", "Pantheon Panel", "Attack in place". PLEASE NOTE: even if this is supposed to work even with customized key setup, I strongly sugest you to keep the DEFAULT key setup to ensure the bot work.

actionstring
The option you want to retrieve the key for.
keyKeys
The key configured for this option.

Returns: True on success.

HasVisibleHighlightLabel

MethodLink ↗
public static bool LokiPoe.Input.HasVisibleHighlightLabel(NetworkObject obj)

Return true if the NetworkObject has a visible label ingame.

objNetworkObject
The NetworkObject to analize

Returns: True if the label is visible

HighlightObject

MethodLink ↗
public static bool LokiPoe.Input.HighlightObject(NetworkObject obj)

This function will move the mouse over a specific NetworkObject. This is a key function and must be used to loot, attack or interact with the game world.

objNetworkObject
The NetworkObject to highlight.

Returns: Return true if the object is successfully highlighted.

MoveMouse

MethodLink ↗Deprecated
public static void LokiPoe.Input.MoveMouse(int cx, int cy)

Not used anymore, use MouseManager class to handle all mouse movments.

cxint
Specifies cx.
cyint
Specifies cy.

MoveMouse

MethodLink ↗Deprecated
public static void LokiPoe.Input.MoveMouse(float cx, float cy)

Not used anymore, use MouseManager class to handle all mouse movments.

cxfloat
Specifies cx.
cyfloat
Specifies cy.

MoveMouseToScreenPos

MethodLink ↗
public static void LokiPoe.Input.MoveMouseToScreenPos(Vector2 pos)

Move the mouse to a specific location using screen position, this method is rarely used.

posVector2
A vector of 2 float, internally converted to integer, describing the X and Y coordinate

MoveMouseToScreenPos

MethodLink ↗
public static void LokiPoe.Input.MoveMouseToScreenPos(Vector2i pos)

Move the mouse to a specific location using screen position.

posVector2i
A vector of 2 integers describing the X and Y coordinate

MoveMouseToScreenPos

MethodLink ↗
public static void LokiPoe.Input.MoveMouseToScreenPos(int posX, int posY, bool sleep = true)

Move the mouse to a specific location using screen position.

posXint
X coordinate
posYint
Y coordinate
sleepbool
Should the function sleep after the move? default sleep is a random number between 25 and 40ms

MoveMouseToWorldPos

MethodLink ↗
public static void LokiPoe.Input.MoveMouseToWorldPos(string reason, Vector2 destination)

Move the mouse to a specific location using world position (position of game objects) This method take care of converting the world position accounting for the current camera zoom and rotation, to screen position.

reasonstring
The reason of of the move, usually used for debugging purpose.
destinationVector2
the position where to move the mouse.

MoveMouseToWorldPos

MethodLink ↗
public static void LokiPoe.Input.MoveMouseToWorldPos(string reason, Vector2i destination)

Move the mouse to a specific location using world position (position of game objects) This method take care of converting the world position accounting for the current camera zoom and rotation, to screen position.

reasonstring
The reason of of the move, usually used for debugging purpose.
destinationVector2i
the position where to move the mouse.

MoveMouseToWorldPos

MethodLink ↗
public static void LokiPoe.Input.MoveMouseToWorldPos(string reason, Vector3 destination)

Move the mouse to a specific location using world position (position of game objects) This method take care of converting the world position accounting for the current camera zoom and rotation, to screen position.

reasonstring
The reason of of the move, usually used for debugging purpose.
destinationVector3
the position where to move the mouse.

PasteText

MethodLink ↗
public static void LokiPoe.Input.PasteText(string msg)

Paste a specific text into a text field.

msgstring
The text to paste.

PasteText

MethodLink ↗
public static void LokiPoe.Input.PasteText(string msg, bool useSend)

Paste a specific text into a text field.

msgstring
The text to paste.
useSendbool
If true, SendMessage will be used instead of PostMessage, it is a little more slower, but 100% garantee the message to be fully inserted, while PostMessage is fast, but might fail on low fps, or overloaded cpu scenarios.

ResetKeysState

MethodLink ↗
public static void LokiPoe.Input.ResetKeysState()

Reset all the keys to unpressed.

RunInSta

MethodLink ↗
public static void LokiPoe.Input.RunInSta(Action action)

Executes the run in sta operation with the supplied arguments.

actionAction
Specifies action.

SimulateKeyEvent

MethodLink ↗
public static void LokiPoe.Input.SimulateKeyEvent(Keys key, bool down = true, bool @char = false, bool up = false, Keys extraKey = null)

Press a key using System.Window.Form.Keys as parameter, this is used to send Keystroke for special keys like `Enter`, `Esc` etc. The most common usage for this method is `SimulateKeyEvent(Keys.Escape, true, false, false); that simulate a single keystroke.`

keyKeys
The key to be pressed
downbool
Should the message indicate a key down event.
charbool
Are we passing a char to the event.
upbool
Should the message indicate a key up event.
extraKeyKeys
Specifies extra key. Optional; the default is shown in the signature.

SimulateKeyEvent

MethodLink ↗
public static void LokiPoe.Input.SimulateKeyEvent(char ch)

Press a key using the char rapresentation of that key. this is usually used to send specific keystroke, like `a`, `b` `c` etc etc.

chchar
The char to be pressed.

InitialInputEventDelayMs

PropertyLink ↗
public static int LokiPoe.Input.InitialInputEventDelayMs { get; }

The default value for interaction pause is a random number between 40 and 130ms.

InputEventDelayMs

PropertyLink ↗
public static int LokiPoe.Input.InputEventDelayMs { get; set; }

Get or set the ms to pause between interactions, the default value is a random number between 40 and 130ms. Pls keep in mind that setting this to low make the bot super fast but not human like anymore.

Related types

DPB1 0.3.29.47 · Reference reviewed 2026-10-02. Descriptions use source summaries where available, otherwise concise signature-based descriptions. Examples illustrate usage; they are not a live-game test.