Window.Send - screenshakes/Desktopia GitHub Wiki

Sends key down message to the window.

public void SendKeyDown(KeyCode keyCode)
{
    PostMessage(Handle, Inputs.WM_KEYDOWN, (uint) Inputs.KeyCodeToVKCode[keyCode], 0);
}

Sends key pressed message to the window.

public void SendKey(KeyCode keyCode)
{
    PostMessage(Handle, Inputs.WM_KEYDOWN, (uint) Inputs.KeyCodeToVKCode[keyCode], (uint) 1 << 30);
}

Sends key up message to the window.

public void SendKeyUp(KeyCode keyCode)
{
    PostMessage(Handle, Inputs.WM_KEYUP, (uint) Inputs.KeyCodeToVKCode[keyCode], (uint) 1 << 30 | (uint) 1 << 31);
}

Sends text message to the window.

public void SendText(string text))
{
    SendMessage(Handle, WM_SETTEXT, 0, text);
}