MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / ClearInputKeys

Method ClearInputKeys

Source/3rdParty/imgui/imgui.cpp:1760–1775  ·  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

1758
1759// Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.
1760void ImGuiIO::ClearInputKeys()
1761{
1762 ImGuiContext& g = *Ctx;
1763 for (int key = ImGuiKey_NamedKey_BEGIN; key < ImGuiKey_NamedKey_END; key++)
1764 {
1765 if (ImGui::IsMouseKey((ImGuiKey)key))
1766 continue;
1767 ImGuiKeyData* key_data = &g.IO.KeysData[key - ImGuiKey_NamedKey_BEGIN];
1768 key_data->Down = false;
1769 key_data->DownDuration = -1.0f;
1770 key_data->DownDurationPrev = -1.0f;
1771 }
1772 KeyCtrl = KeyShift = KeyAlt = KeySuper = false;
1773 KeyMods = ImGuiMod_None;
1774 InputQueueCharacters.resize(0); // Behavior of old ClearInputCharacters().
1775}
1776
1777void ImGuiIO::ClearInputMouse()
1778{

Callers 2

UpdateKeyboardInputsMethod · 0.80
UpdateInputEventsMethod · 0.80

Calls 2

IsMouseKeyFunction · 0.85
resizeMethod · 0.45

Tested by

no test coverage detected