AutoHotkey Migration: Keyboard And Mouse

Mapping AutoHotkey send, key state, waits, mouse movement, and clicks to EyeAuras input APIs.

AutoHotkey Migration: Keyboard And Mouse

Use this page for Send, SendText, SendInput, GetKeyState, KeyWait, MouseMove, Click, MouseClick, and MouseGetPos. Hotkey declaration itself lives in Hotkeys.

Quick Map

AutoHotkey NeedAHK APIsEyeAuras RouteFirst C# ShapeJudgmentNotes
Send keyboard or text inputSend, SendText, SendInput, {Key down}, {Key up}ISendInputScriptingApiSendInput.KeyPress(Key.F1); SendInput.Text("hello");Good for explicit input; weak for full AHK send grammar.Use the stable ISendInputScriptingApi, not deprecated unstable aliases. AHK's {Raw}, {Text}, {Blind}, modifier restoration, SendMode, and SendLevel are not one-to-one.
Read key or mouse stateGetKeyState, KeyWaitISendInputScriptingApi.IsKeyDown, IsMouseDownif (SendInput.IsKeyDown(Key.LeftCtrl)) { ... }GetKeyState is fine; KeyWait is awkward today.No dedicated KeyWait equivalent is documented yet. Use a loop with script Sleep(...) only as a low-level fallback; track a helper or higher-level pattern as a gap.
Move and click mouseMouseMove, Click, MouseClick, MouseGetPosISendInputScriptingApiSendInput.CursorPosition, SendInput.MouseMoveTo(x, y), SendInput.MouseLeftClick(x, y)Good, especially with coordinate overloads.EyeAuras methods operate through the selected input simulator. Prefer coordinate or WinPoint click overloads when translating AHK Click x, y.

Direct Send

AutoHotkey v2:

ahk
SendText "hello"
Send "{F1}"

EyeAuras script:

csharp
ISendInputScriptingApi SendInput { get; init; }

SendInput.Text("hello");
SendInput.KeyPress(Key.F1);

Recommendation: Good shape for explicit text and keys. Full AHK send-string grammar is not a one-to-one migration; complex {Blind}, {Raw}, repeat, and modifier cases should be translated deliberately.

Wait For Key Release

AutoHotkey v2:

KeyWait "LButton"

EyeAuras script, current low-level shape:

csharp
ISendInputScriptingApi SendInput { get; init; }

while (SendInput.IsMouseDown(MouseButton.Left) && !cancellationToken.IsCancellationRequested)
{
    Sleep(10);
}

Recommendation: Awkward but usable as a low-level fallback. A small helper such as WaitUntilReleased(...) would be more user-friendly; timeout, logical vs physical state, and down vs up semantics are tracked in AHK Gaps.

Click At Coordinates

AutoHotkey v2:

Click 100, 200

EyeAuras script:

csharp
ISendInputScriptingApi SendInput { get; init; }

SendInput.MouseLeftClick(100, 200);

Recommendation: Good shape. Use coordinate or WinPoint overloads instead of moving first and clicking second unless the movement itself matters.