Enum ConsoleInputFlags

When capturing input, what events are you interested in?

enum ConsoleInputFlags : int { ... }

Enum members

NameDescription
allInputEvents subscribe to all input events. Note: in previous versions, this also returned release events. It no longer does, use allInputEventsWithRelease if you want them.
allInputEventsWithRelease subscribe to all input events, including (unreliable on Posix) key release events.
echo do you want to automatically echo input back to the user?
mouse capture mouse events
paste capture paste events (note: without this, paste can come through as keystrokes)
raw raw input returns keystrokes immediately, without line buffering
releasedKeys key release events. Not reliable on Posix.
size window resize events

Note

these flags can be OR'd together to select more than one option at a time.

Ctrl+C and other keyboard input is always captured, though it may be line buffered if you don't use raw. The rationale for that is to ensure the Terminal destructor has a chance to run, since the terminal is a shared resource and should be put back before the program terminates.