IM_ASSERT(ImGui::IsNamedKeyOrModKey(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(ImGui::IsAliasKey(key)==false);// Backend cannot submit ImGuiKey_MouseXXX values they are automatically inferred from AddMouseXXX() events.
IM_ASSERT(key!=ImGuiMod_Shortcut);// We could easily support the translation here but it seems saner to not accept it (TestEngine perform a translation itself)
IM_ASSERT((IsNamedKeyOrModKey(key)||key==ImGuiKey_None)&&"Support for user key indices was dropped in favor of ImGuiKey. Please update backend and user code.");
// [Internal] Prior to 1.87 we required user to fill io.KeysDown[512] using their own native index + the io.KeyMap[] array.
// We are ditching this method but keeping a legacy path for user code doing e.g. IsKeyPressed(MY_NATIVE_KEY_CODE)
@ -1448,6 +1448,7 @@ enum ImGuiKey : int
#endif
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
ImGuiMod_Shortcut=ImGuiMod_Ctrl,// Removed in 1.90.7, you can now simply use ImGuiMod_Ctrl
ImGuiKey_ModCtrl=ImGuiMod_Ctrl,ImGuiKey_ModShift=ImGuiMod_Shift,ImGuiKey_ModAlt=ImGuiMod_Alt,ImGuiKey_ModSuper=ImGuiMod_Super,// Renamed in 1.89
//ImGuiKey_KeyPadEnter = ImGuiKey_KeypadEnter, // Renamed in 1.87
#endif
@ -2093,7 +2094,7 @@ struct ImGuiIO
// Miscellaneous options
boolMouseDrawCursor;// = false // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations.
boolConfigMacOSXBehaviors;// = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl.
boolConfigMacOSXBehaviors;// = defined(__APPLE__) // Swap Cmd<>Ctrl keys + OS X style text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl.
boolConfigInputTrickleEventQueue;// = true // Enable input queue trickling: some types of events submitted during the same frame (e.g. button down + up) will be spread over multiple frames, improving interactions with low framerates.
boolConfigInputTextCursorBlink;// = true // Enable blinking cursor (optional as some users consider it to be distracting).
boolConfigInputTextEnterKeepActive;// = false // [BETA] Pressing Enter will keep item active and select contents (single-line only).
// Other state maintained from data above + IO function calls
ImGuiKeyChordKeyMods;// Key mods flags (any of ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Alt/ImGuiMod_Super flags, same as io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags. DOES NOT CONTAINS ImGuiMod_Shortcut which is pretranslated). Read-only, updated by NewFrame()
ImGuiKeyChordKeyMods;// Key mods flags (any of ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Alt/ImGuiMod_Super flags, same as io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags. Read-only, updated by NewFrame()
ImGuiKeyDataKeysData[ImGuiKey_KeysData_SIZE];// Key state for all known keys. Use IsKeyXXX() functions to access this.
boolWantCaptureMouseUnlessPopupClose;// Alternative to WantCaptureMouse: (WantCaptureMouse == true && WantCaptureMouseUnlessPopupClose == false) when a click over void is expected to close a popup.
ImVec2MousePosPrev;// Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)
ImGui::SameLine();HelpMarker("Enable resizing of windows from their edges and from the lower-left corner.\nThis requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback.");
ImU16Mods;// Technically we'd only need 4-bits but for simplify we store ImGuiMod_ values which need 16-bits. ImGuiMod_Shortcut is already translated to Ctrl/Super.
ImU16Mods;// Technically we'd only need 4-bits but for simplify we store ImGuiMod_ values which need 16-bits.
ImU8RoutingCurrScore;// [DEBUG] For debug display
ImU8RoutingNextScore;// Lower is better (0: perfect score)
ImGuiIDRoutingCurr;
@ -2101,8 +2101,8 @@ struct ImGuiContext
ImGuiNavItemDataNavTabbingResultFirst;// First tabbing request candidate within NavWindow and flattened hierarchy
// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize)
ImGuiKeyChordConfigNavWindowingKeyNext;// = ImGuiMod_Ctrl | ImGuiKey_Tab, for reconfiguration (see #4828)
ImGuiKeyChordConfigNavWindowingKeyNext;// = ImGuiMod_Ctrl | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiKey_Tab on OS X). For reconfiguration (see #4828)
ImGuiKeyChordConfigNavWindowingKeyPrev;// = ImGuiMod_Ctrl | ImGuiMod_Shift | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiMod_Shift | ImGuiKey_Tab on OS X)
ImGuiWindow*NavWindowingTarget;// Target window when doing CTRL+Tab (or Pad Menu + FocusPrev/Next), this window is temporarily displayed top-most!
ImGuiWindow*NavWindowingTargetAnim;// Record of last valid NavWindowingTarget until DimBgRatio and NavWindowingHighlightAlpha becomes 0.0f, so the fade-out can stay on it.
ImGuiWindow*NavWindowingListWindow;// Internal window actually listing the CTRL+Tab contents
IMGUI_APIvoidSetItemKeyOwner(ImGuiKeykey,ImGuiInputFlagsflags=0);// Set key owner to last item if it is hovered or active. Equivalent to 'if (IsItemHovered() || IsItemActive()) { SetKeyOwner(key, GetItemID());'.
IMGUI_APIboolTestKeyOwner(ImGuiKeykey,ImGuiIDowner_id);// Test that key is either not owned, either owned by 'owner_id'
constboolis_wordmove_key_down=is_osx?io.KeyAlt:io.KeyCtrl;// OS X style: Text editing cursor movement using Alt instead of Ctrl
constboolis_startend_key_down=is_osx&&io.KeySuper&&!io.KeyCtrl&&!io.KeyAlt;// OS X style: Line/Text Start and End using Cmd+Arrows instead of Home/End
constboolis_startend_key_down=is_osx&&io.KeyCtrl&&!io.KeySuper&&!io.KeyAlt;// OS X style: Line/Text Start and End using Cmd+Arrows instead of Home/End
// Using Shortcut() with ImGuiInputFlags_RouteFocused (default policy) to allow routing operations for other code (e.g. calling window trying to use CTRL+A and CTRL+B: formet would be handled by InputText)
// Otherwise we could simply assume that we own the keys as we are active.
// We allow validate/cancel with Nav source (gamepad) to makes it easier to undo an accidental NavInput press with no keyboard wired, but otherwise it isn't very useful.