|
@@ -4096,6 +4096,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
|
state->Stb.insert_mode = 1; // stb field name is indeed incorrect (see #2863)
|
|
|
}
|
|
|
|
|
|
+ const bool is_osx = io.ConfigMacOSXBehaviors;
|
|
|
if (g.ActiveId != id && init_make_active)
|
|
|
{
|
|
|
IM_ASSERT(state && state->ID == id);
|
|
@@ -4118,6 +4119,8 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
|
SetKeyOwner(ImGuiKey_PageUp, id);
|
|
|
SetKeyOwner(ImGuiKey_PageDown, id);
|
|
|
}
|
|
|
+ if (is_osx)
|
|
|
+ SetKeyOwner(ImGuiMod_Alt, id);
|
|
|
if (flags & (ImGuiInputTextFlags_CallbackCompletion | ImGuiInputTextFlags_AllowTabInput)) // Disable keyboard tabbing out as we will use the \t character.
|
|
|
SetKeyOwner(ImGuiKey_Tab, id);
|
|
|
}
|
|
@@ -4187,7 +4190,6 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
|
const float mouse_x = (io.MousePos.x - frame_bb.Min.x - style.FramePadding.x) + state->ScrollX;
|
|
|
const float mouse_y = (is_multiline ? (io.MousePos.y - draw_window->DC.CursorPos.y) : (g.FontSize * 0.5f));
|
|
|
|
|
|
- const bool is_osx = io.ConfigMacOSXBehaviors;
|
|
|
if (select_all)
|
|
|
{
|
|
|
state->SelectAll();
|
|
@@ -4288,7 +4290,6 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
|
state->Stb.row_count_per_page = row_count_per_page;
|
|
|
|
|
|
const int k_mask = (io.KeyShift ? STB_TEXTEDIT_K_SHIFT : 0);
|
|
|
- const bool is_osx = io.ConfigMacOSXBehaviors;
|
|
|
const bool is_wordmove_key_down = is_osx ? io.KeyAlt : io.KeyCtrl; // OS X style: Text editing cursor movement using Alt instead of Ctrl
|
|
|
const bool is_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
|
|
|
|