Table of Contents

Enum EnterBehavior

Namespace
SharpConsoleUI.Controls
Assembly
SharpConsoleUI.dll

What the Enter key does in a PromptControl.

public enum EnterBehavior
Extension Methods

Fields

InsertNewline = 1

Enter inserts a newline and Ctrl+Enter submits, like a text area.

Note that no Unix terminal reports Ctrl+Enter distinctly from Enter without CSI-u or modifyOtherKeys, neither of which the Unix input parser enables — so on Linux a control in this mode has no keyboard submit, and the application is expected to submit from a button or by raising the event itself. Submit is the default for that reason.

Submit = 0

Enter raises Entered. The default, and the meaning Enter has always had here, so turning on Multiline does not silently change what the key does. When multiline, Alt+Enter (or Ctrl+L) inserts a newline.