MCPcopy Create free account
hub / github.com/Wemino/EchoPatch / SetKeyEventNativeData

Method SetKeyEventNativeData

include/imgui/imgui.cpp:1863–1873  ·  view source on GitHub ↗

[Optional] Call after AddKeyEvent(). Specify native keycode, scancode + Specify index for legacy <1.87 IsKeyXXX() functions with native indices. If you are writing a backend in 2022 or don't use IsKeyXXX() with native values that are not ImGuiKey values, you can avoid calling this.

Source from the content-addressed store, hash-verified

1861// Specify native keycode, scancode + Specify index for legacy <1.87 IsKeyXXX() functions with native indices.
1862// If you are writing a backend in 2022 or don't use IsKeyXXX() with native values that are not ImGuiKey values, you can avoid calling this.
1863void ImGuiIO::SetKeyEventNativeData(ImGuiKey key, int native_keycode, int native_scancode, int native_legacy_index)
1864{
1865 if (key == ImGuiKey_None)
1866 return;
1867 IM_ASSERT(ImGui::IsNamedKey(key)); // >= 512
1868 IM_ASSERT(native_legacy_index == -1 || ImGui::IsLegacyKey((ImGuiKey)native_legacy_index)); // >= 0 && <= 511
1869 IM_UNUSED(key); // Yet unused
1870 IM_UNUSED(native_keycode); // Yet unused
1871 IM_UNUSED(native_scancode); // Yet unused
1872 IM_UNUSED(native_legacy_index); // Yet unused
1873}
1874
1875// Set master flag for accepting key/mouse/text events (default to true). Useful if you have native dialog boxes that are interrupting your application loop/refresh, and you want to disable events being queued while your app is frozen.
1876void ImGuiIO::SetAppAcceptingEvents(bool accepting_events)

Callers 1

Calls 2

IsNamedKeyFunction · 0.85
IsLegacyKeyFunction · 0.85

Tested by

no test coverage detected