MCPcopy Create free account
hub / github.com/Sven-vh/ImReflect / KeyDown

Method KeyDown

imgui/imgui_test_engine/imgui_test_engine/imgui_te_context.cpp:2551–2570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2549}
2550
2551void ImGuiTestContext::KeyDown(ImGuiKeyChord key_chord)
2552{
2553 if (IsError())
2554 return;
2555
2556 IMGUI_TEST_CONTEXT_REGISTER_DEPTH(this);
2557#if IMGUI_VERSION_NUM >= 19012
2558 const char* chord_desc = ImGui::GetKeyChordName(key_chord);
2559#else
2560 char chord_desc[32];
2561 ImGui::GetKeyChordName(key_chord, chord_desc, IM_ARRAYSIZE(chord_desc));
2562#endif
2563 LogDebug("KeyDown(%s)", chord_desc);
2564 if (EngineIO->ConfigRunSpeed == ImGuiTestRunSpeed_Cinematic)
2565 SleepShort();
2566
2567 Inputs->Queue.push_back(ImGuiTestInput::ForKeyChord(key_chord, true));
2568 Yield();
2569 Yield();
2570}
2571
2572void ImGuiTestContext::KeyUp(ImGuiKeyChord key_chord)
2573{

Callers 6

RegisterTests_DockingFunction · 0.80
RegisterTests_NavFunction · 0.80
RegisterTests_InputsFunction · 0.80
RegisterTests_WindowFunction · 0.80

Calls 1

IsErrorFunction · 0.85

Tested by 4

RegisterTests_DockingFunction · 0.64
RegisterTests_NavFunction · 0.64
RegisterTests_InputsFunction · 0.64
RegisterTests_WindowFunction · 0.64