Enum ConsoleInputFlags
When capturing input, what events are you interested in?
enum ConsoleInputFlags : int { ... }
Enum members
| Name | Description |
|---|---|
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. |
selectiveMouse
|
Uses arsd terminal emulator's proprietary extension to select mouse input only for special cases, intended to enhance getline while keeping default terminal mouse behavior in other places. If it is set, it overrides [mouse] event flag. If not using the arsd terminal emulator, this will disable application mouse input. |
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.