Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.
| 1779 | |
| 1780 | // Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons. |
| 1781 | void ImGuiIO::ClearInputKeys() |
| 1782 | { |
| 1783 | ImGuiContext& g = *Ctx; |
| 1784 | for (int key = ImGuiKey_NamedKey_BEGIN; key < ImGuiKey_NamedKey_END; key++) |
| 1785 | { |
| 1786 | if (ImGui::IsMouseKey((ImGuiKey)key)) |
| 1787 | continue; |
| 1788 | ImGuiKeyData* key_data = &g.IO.KeysData[key - ImGuiKey_NamedKey_BEGIN]; |
| 1789 | key_data->Down = false; |
| 1790 | key_data->DownDuration = -1.0f; |
| 1791 | key_data->DownDurationPrev = -1.0f; |
| 1792 | } |
| 1793 | KeyCtrl = KeyShift = KeyAlt = KeySuper = false; |
| 1794 | KeyMods = ImGuiMod_None; |
| 1795 | InputQueueCharacters.resize(0); // Behavior of old ClearInputCharacters(). |
| 1796 | } |
| 1797 | |
| 1798 | void ImGuiIO::ClearInputMouse() |
| 1799 | { |
no test coverage detected