MCPcopy Create free account
hub / github.com/Lovrom8/RSMods / SendEscapeKey

Function SendEscapeKey

DLL/Keyboard.cpp:19–23  ·  view source on GitHub ↗

Simply send ESC key as if pressed via the keyboard Used to avoid menus during startup.

Source from the content-addressed store, hash-verified

17 /// Used to avoid menus during startup.
18 /// </summary>
19 void SendEscapeKey() {
20 PostMessage(D3DHooks::GetGameWindow(), WM_KEYDOWN, VK_ESCAPE, 0);
21 Sleep(30);
22 PostMessage(D3DHooks::GetGameWindow(), WM_KEYUP, VK_ESCAPE, 0);
23 }
24
25 /// <summary>
26 /// Presses Enter. Normally used in a loop to skip most of the login dialog. "Fork in the toaster" method

Callers 1

HandleAutoLoadProfileFunction · 0.85

Calls 1

GetGameWindowFunction · 0.85

Tested by

no test coverage detected