DPB2Class · Game state and actions

LokiPoe.Input

Class to interact with the game using keyboard.

Namespace: DreamPoeBot.Loki.Game

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

Members and overloads

1 declared here
Show all members

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.Esc, 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.

Extra key to press together with the main one (like ctrl/shift/alt)

No dedicated example has been reviewed for this member. Browse the class reference; its examples may demonstrate other operations.

DPB2 0.4.5.103 · 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.