MCPcopy Create free account
hub / github.com/cinder/Cinder / ClearInputKeys

Method ClearInputKeys

src/imgui/imgui.cpp:1661–1676  ·  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

1659
1660// Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.
1661void ImGuiIO::ClearInputKeys()
1662{
1663 ImGuiContext& g = *Ctx;
1664 for (int key = ImGuiKey_NamedKey_BEGIN; key < ImGuiKey_NamedKey_END; key++)
1665 {
1666 if (ImGui::IsMouseKey((ImGuiKey)key))
1667 continue;
1668 ImGuiKeyData* key_data = &g.IO.KeysData[key - ImGuiKey_NamedKey_BEGIN];
1669 key_data->Down = false;
1670 key_data->DownDuration = -1.0f;
1671 key_data->DownDurationPrev = -1.0f;
1672 }
1673 KeyCtrl = KeyShift = KeyAlt = KeySuper = false;
1674 KeyMods = ImGuiMod_None;
1675 InputQueueCharacters.resize(0); // Behavior of old ClearInputCharacters().
1676}
1677
1678void ImGuiIO::ClearInputMouse()
1679{

Callers 2

UpdateKeyboardInputsMethod · 0.80
UpdateInputEventsMethod · 0.80

Calls 2

IsMouseKeyFunction · 0.85
resizeMethod · 0.45

Tested by

no test coverage detected