You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support Shift+Enter for multiline input (industry standard) #9239
What would it need a new flag? Can you help me clarify this?
WITHOUT ImGuiInputTextFlags_CtrlEnterForNewLine:
Enter: new line (current behavior)
Ctrl+Enter: validate (current behavior)
Shift+Enter: new line (suggested new behavior)
WITH ImGuiInputTextFlags_CtrlEnterForNewLine:
Enter: validate (current behavior)
Ctrl+Enter: new-line (current behavior)
Shift+Enter: new line (suggested new behavior)
By this logic:
(1) There is no need for a new flag: Shift+Enter would always enter a new line.
(2) ImGuiInputTextFlags_CtrlEnterForNewLine could in theory be renamed ImGuiInputTextFlags_EnterToValidate aka invert the description to instead focus on the fact that this is primarily changing the behavior of the most-common "Enter" action and put less emphasis on Ctrl+Enter for new-line, since Shift+Enter always work.
Okay, I like your proposal, it's perfect for my project. I plan to use the first bechaviour: WITHOUT ImGuiInputTextFlags_CtrlEnterForNewLine. In my opinion, the second option (WITH ImGuiInputTextFlags_CtrlEnterForNewLine) is also useful...
Activity
ocornut commentedon Feb 16, 2026
Hello,
What would it need a new flag? Can you help me clarify this?
WITHOUT
ImGuiInputTextFlags_CtrlEnterForNewLine:WITH
ImGuiInputTextFlags_CtrlEnterForNewLine:By this logic:
(1) There is no need for a new flag: Shift+Enter would always enter a new line.
(2)
ImGuiInputTextFlags_CtrlEnterForNewLinecould in theory be renamedImGuiInputTextFlags_EnterToValidateaka invert the description to instead focus on the fact that this is primarily changing the behavior of the most-common "Enter" action and put less emphasis on Ctrl+Enter for new-line, since Shift+Enter always work.mekhontsev commentedon Feb 17, 2026
Nice! Thanks for the clarification! )
ocornut commentedon Feb 17, 2026
Hello,
Seems like you misunderstood my message as the feature is not implemented yet and I was hoping for your feedback.
mekhontsev commentedon Feb 17, 2026
Okay, I like your proposal, it's perfect for my project. I plan to use the first bechaviour: WITHOUT ImGuiInputTextFlags_CtrlEnterForNewLine. In my opinion, the second option (WITH ImGuiInputTextFlags_CtrlEnterForNewLine) is also useful...
InputText: Shift+Enter in multi-line editor always adds a new line. (#…
ocornut commentedon Feb 24, 2026
Added Shift+Enter in 68a91d3.
InputText: reworked `io.ConfigInputTextEnterKeepActive` mode so that …