MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / ClearInputKeys

Method ClearInputKeys

include/imgui/imgui.cpp:1781–1796  ·  view source on GitHub ↗

Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.

Source from the content-addressed store, hash-verified

1779
1780// Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.
1781void ImGuiIO::ClearInputKeys()
1782{
1783 ImGuiContext& g = *Ctx;
1784 for (int key = ImGuiKey_NamedKey_BEGIN; key < ImGuiKey_NamedKey_END; key++)
1785 {
1786 if (ImGui::IsMouseKey((ImGuiKey)key))
1787 continue;
1788 ImGuiKeyData* key_data = &g.IO.KeysData[key - ImGuiKey_NamedKey_BEGIN];
1789 key_data->Down = false;
1790 key_data->DownDuration = -1.0f;
1791 key_data->DownDurationPrev = -1.0f;
1792 }
1793 KeyCtrl = KeyShift = KeyAlt = KeySuper = false;
1794 KeyMods = ImGuiMod_None;
1795 InputQueueCharacters.resize(0); // Behavior of old ClearInputCharacters().
1796}
1797
1798void ImGuiIO::ClearInputMouse()
1799{

Callers 2

UpdateKeyboardInputsMethod · 0.80
UpdateInputEventsMethod · 0.80

Calls 2

IsMouseKeyFunction · 0.85
resizeMethod · 0.45

Tested by

no test coverage detected