IM_ASSERT(&g.IO==this&&"Can only add events to current context.");
IM_ASSERT(ImGui::IsNamedKey(key));// Backend needs to pass a valid ImGuiKey_ constant. 0..511 values are legacy native key codes which are not accepted by this API.
IM_ASSERT(IsNamedKey(key)&&"Support for user key indices was dropped in favor of ImGuiKey. Please update backend and user code.");
IM_ASSERT((IsNamedKey(key)||key==ImGuiKey_None)&&"Support for user key indices was dropped in favor of ImGuiKey. Please update backend and user code.");
IM_ASSERT(io.NavInputs[n]==0.0f&&"Backend needs to either only use io.AddKeyEvent()/io.AddKeyAnalogEvent(), either only fill legacy io.NavInputs[]. Not both!");
#define NAV_MAP_KEY(_KEY, _NAV_INPUT, _ACTIVATE_NAV) do { io.NavInputs[_NAV_INPUT] = io.KeysData[_KEY - ImGuiKey_KeysData_OFFSET].AnalogValue; if (_ACTIVATE_NAV && io.NavInputs[_NAV_INPUT] > 0.0f) { g.NavInputSource = ImGuiInputSource_Gamepad; } } while (0)
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
IMGUI_APIvoidAddKeyEvent(ImGuiKeykey,booldown);// Queue a new key down/up event. Key should be "translated" (as in, generally ImGuiKey_A matches the key end-user would use to emit an 'A' character)
IMGUI_APIvoidAddKeyModsEvent(ImGuiKeyModFlagsmodifiers);// Queue a change of Ctrl/Shift/Alt/Super modifiers
IMGUI_APIvoidAddMousePosEvent(floatx,floaty);// Queue a mouse position update. Use -FLT_MAX,-FLT_MAX to signify no mouse (e.g. app not focused and not hovered)
IMGUI_APIvoidAddMouseButtonEvent(intbutton,booldown);// Queue a mouse button change
IMGUI_APIvoidAddMouseWheelEvent(floatwh_x,floatwh_y);// Queue a mouse wheel update
IMGUI_APIvoidAddFocusEvent(boolfocused);// Queue a gain/loss of focus for the application (generally based on OS/platform focus of your window)
IMGUI_APIvoidAddInputCharacter(unsignedintc);// Queue a new character input
IMGUI_APIvoidAddInputCharacterUTF16(ImWchar16c);// Queue a new character input from an UTF-16 character, it can be a surrogate
IMGUI_APIvoidAddInputCharactersUTF8(constchar*str);// Queue a new characters input from an UTF-8 string
IMGUI_APIvoidAddKeyEvent(ImGuiKeykey,booldown,ImGuiInputSourcesrc=ImGuiInputSource_Keyboard);// Queue a new key down/up event. Key should be "translated" (as in, generally ImGuiKey_A matches the key end-user would use to emit an 'A' character)
IMGUI_APIvoidAddKeyAnalogEvent(ImGuiKeykey,booldown,floatv,ImGuiInputSourcesrc);// Queue a new key down/up event for analog values (e.g. ImGuiKey_Gamepad_ values). Dead-zones should be handled by the backend.
IMGUI_APIvoidAddKeyModsEvent(ImGuiKeyModFlagsmodifiers);// Queue a change of Ctrl/Shift/Alt/Super modifiers
IMGUI_APIvoidAddMousePosEvent(floatx,floaty);// Queue a mouse position update. Use -FLT_MAX,-FLT_MAX to signify no mouse (e.g. app not focused and not hovered)
IMGUI_APIvoidAddMouseButtonEvent(intbutton,booldown);// Queue a mouse button change
IMGUI_APIvoidAddMouseWheelEvent(floatwh_x,floatwh_y);// Queue a mouse wheel update
IMGUI_APIvoidAddFocusEvent(boolfocused);// Queue a gain/loss of focus for the application (generally based on OS/platform focus of your window)
IMGUI_APIvoidAddInputCharacter(unsignedintc);// Queue a new character input
IMGUI_APIvoidAddInputCharacterUTF16(ImWchar16c);// Queue a new character input from an UTF-16 character, it can be a surrogate
IMGUI_APIvoidAddInputCharactersUTF8(constchar*str);// Queue a new characters input from an UTF-8 string
IMGUI_APIvoidClearInputCharacters();// [Internal] Clear the text input buffer manually
IMGUI_APIvoidClearInputKeys();// [Internal] Release all keys
@ -2009,6 +2049,7 @@ struct ImGuiIO
floatPenPressure;// Touch/Pen pressure (0.0f to 1.0f, should be >0.0f only when MouseDown[0] == true). Helper storage currently unused by Dear ImGui.
boolAppFocusLost;
ImS8BackendUsingLegacyKeyArrays;// -1: unknown, 0: using AddKeyEvent(), 1: using legacy io.KeysDown[]
boolBackendUsingLegacyNavInputArray;// 0: using AddKeyAnalogEvent(), 1: writing to legacy io.NavInputs[] directly
ImWchar16InputQueueSurrogate;// For AddInputCharacterUTF16()
ImVector<ImWchar>InputQueueCharacters;// Queue of _characters_ input (obtained by platform backend). Fill using AddInputCharacter() helper.