DPB1Class · Game state and actions

LokiPoe.Input

Class to interact with the game using keyboard.

Namespace: DreamPoeBot.Loki.Game

public class LokiPoe.Input
Reference: DPB1 0.3.29.56Compare the DPB2 reference → Check signatures and usage notes separately; a matching type is not a compatibility guarantee.

Members and overloads

29 declared here

WM_PASTE

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

Reads wm_paste on LokiPoe.Input as int. The exact type and accessors are shown below.

Value type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: voidNo return value.

Parameters

cx
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

X coordinate

cy
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: voidNo return value.

Parameters

cx
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

X coordinate

cy
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: voidNo return value.

Parameters

cx
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

X coordinate

cy
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: voidNo return value.

Parameters

cx
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

X coordinate

cy
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: voidNo return value.

Parameters

cx
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

X coordinate

cy
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: voidNo return value.

Parameters

cx
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

X coordinate

cy
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

obj
Parameter type: NetworkObject

The NetworkObject to analize

coords

The position of the label or Vector2.Zero if no lable are visible.

size

The dimensions of the label or Vector2.Zero if no lable are visible.

onlyVisible
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: Vector2
Explore Vector2 → members & methods

Provides vector2 data and the operations listed below. Related types link to the values this API consumes or returns.

Parameters

obj
Parameter type: NetworkObject

The NetworkObject to analize

onlyVisible
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

action
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

The option you want to retrieve the key for.

key
Parameter type: KeysNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

obj
Parameter type: NetworkObject

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.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

obj
Parameter type: NetworkObject

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.

Return type: voidNo return value.

Parameters

cx
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies cx.

cy
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: voidNo return value.

Parameters

cx
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies cx.

cy
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: voidNo return value.

Parameters

pos

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.

Return type: voidNo return value.

Parameters

pos

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.

Return type: voidNo return value.

Parameters

posX
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

X coordinate

posY
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Y coordinate

sleep
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: voidNo return value.

Parameters

reason
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

The reason of of the move, usually used for debugging purpose.

destination

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.

Return type: voidNo return value.

Parameters

reason
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

The reason of of the move, usually used for debugging purpose.

destination

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.

Return type: voidNo return value.

Parameters

reason
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

The reason of of the move, usually used for debugging purpose.

destination

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.

Return type: voidNo return value.

Parameters

msg
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

The text to paste.

PasteText

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

Paste a specific text into a text field.

Return type: voidNo return value.

Parameters

msg
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

The text to paste.

useSend
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: voidNo return value.

RunInSta

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

Calls RunInSta on LokiPoe.Input with action. This overload has no return value.

Return type: voidNo return value.

Parameters

action
Parameter type: ActionNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.`

Return type: voidNo return value.

Parameters

key
Parameter type: KeysNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

The key to be pressed

down
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Should the message indicate a key down event.

char
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Are we passing a char to the event.

up
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Should the message indicate a key up event.

extraKey
Parameter type: KeysNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: voidNo return value.

Parameters

ch
Parameter type: charNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Value type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Value type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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