Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.
| 1799 | |
| 1800 | // Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons. |
| 1801 | void ImGuiIO::ClearInputKeys() |
| 1802 | { |
| 1803 | ImGuiContext& g = *Ctx; |
| 1804 | for (int key = ImGuiKey_NamedKey_BEGIN; key < ImGuiKey_NamedKey_END; key++) |
| 1805 | { |
| 1806 | if (ImGui::IsMouseKey((ImGuiKey)key)) |
| 1807 | continue; |
| 1808 | ImGuiKeyData* key_data = &g.IO.KeysData[key - ImGuiKey_NamedKey_BEGIN]; |
| 1809 | key_data->Down = false; |
| 1810 | key_data->DownDuration = -1.0f; |
| 1811 | key_data->DownDurationPrev = -1.0f; |
| 1812 | } |
| 1813 | KeyCtrl = KeyShift = KeyAlt = KeySuper = false; |
| 1814 | KeyMods = ImGuiMod_None; |
| 1815 | InputQueueCharacters.resize(0); // Behavior of old ClearInputCharacters(). |
| 1816 | } |
| 1817 | |
| 1818 | void ImGuiIO::ClearInputMouse() |
| 1819 | { |
no test coverage detected