MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / ClearInputKeys

Method ClearInputKeys

TheForceEngine/TFE_Ui/imGUI/imgui.cpp:1473–1489  ·  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

1471
1472// Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.
1473void ImGuiIO::ClearInputKeys()
1474{
1475#ifndef IMGUI_DISABLE_OBSOLETE_KEYIO
1476 memset(KeysDown, 0, sizeof(KeysDown));
1477#endif
1478 for (int n = 0; n < IM_ARRAYSIZE(KeysData); n++)
1479 {
1480 if (ImGui::IsMouseKey((ImGuiKey)(n + ImGuiKey_KeysData_OFFSET)))
1481 continue;
1482 KeysData[n].Down = false;
1483 KeysData[n].DownDuration = -1.0f;
1484 KeysData[n].DownDurationPrev = -1.0f;
1485 }
1486 KeyCtrl = KeyShift = KeyAlt = KeySuper = false;
1487 KeyMods = ImGuiMod_None;
1488 InputQueueCharacters.resize(0); // Behavior of old ClearInputCharacters().
1489}
1490
1491void ImGuiIO::ClearInputMouse()
1492{

Callers 2

UpdateKeyboardInputsMethod · 0.80
UpdateInputEventsMethod · 0.80

Calls 2

IsMouseKeyFunction · 0.85
resizeMethod · 0.45

Tested by

no test coverage detected