Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.
| 1758 | |
| 1759 | // Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons. |
| 1760 | void 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 | |
| 1777 | void ImGuiIO::ClearInputMouse() |
| 1778 | { |
no test coverage detected