MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / OnKeyPressed

Method OnKeyPressed

external/imgui/imgui_widgets.cpp:4303–4313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4301}
4302
4303void ImGuiInputTextState::OnKeyPressed(int key)
4304{
4305 stb_textedit_key(this, Stb, key);
4306 CursorFollow = true;
4307 CursorAnimReset();
4308 const int key_u = (key & ~STB_TEXTEDIT_K_SHIFT);
4309 if (key_u == STB_TEXTEDIT_K_LEFT || key_u == STB_TEXTEDIT_K_LINESTART || key_u == STB_TEXTEDIT_K_TEXTSTART || key_u == STB_TEXTEDIT_K_BACKSPACE || key_u == STB_TEXTEDIT_K_WORDLEFT)
4310 LastMoveDirectionLR = ImGuiDir_Left;
4311 else if (key_u == STB_TEXTEDIT_K_RIGHT || key_u == STB_TEXTEDIT_K_LINEEND || key_u == STB_TEXTEDIT_K_TEXTEND || key_u == STB_TEXTEDIT_K_DELETE || key_u == STB_TEXTEDIT_K_WORDRIGHT)
4312 LastMoveDirectionLR = ImGuiDir_Right;
4313}
4314
4315void ImGuiInputTextState::OnCharPressed(unsigned int c)
4316{

Callers 1

InputTextExMethod · 0.80

Calls 1

stb_textedit_keyFunction · 0.85

Tested by

no test coverage detected