Back to API Reference
Class

SubmitKeyBehavior

sealed
Inherits:InputBehavior

Binds the Enter key to submit instead of inserting a newline: Enter submits on Enter (Shift+Enter makes a newline), ModifierEnter submits on Ctrl/Cmd+Enter (Enter makes a newline). Fits chat composers, comment boxes, prompt and search fields alike. Focus survives submit by default; turn KeepFocusOnSubmit off for submit-and-close surfaces (comment forms, modal editors). For a field that accepts no newlines at all, use SingleLineBehavior instead.

protected override void OnEnable()
protected override void OnDisable()