pub struct ConsoleMode;
Expand description
Wraps constants values of the console modes.
link: https://docs.microsoft.com/en-us/windows/console/getconsolemode
Implementations§
Source§impl ConsoleMode
impl ConsoleMode
Sourcepub const ENABLE_PROCESSED_INPUT: u32 = 1u32
pub const ENABLE_PROCESSED_INPUT: u32 = 1u32
CTRL+C is processed by the system and is not placed in the input buffer.
If the input buffer is being read by ReadFile
or ReadConsole
,
other control keys are processed by the system and are not returned in the ReadFile
or ReadConsole
buffer
Sourcepub const ENABLE_LINE_INPUT: u32 = 2u32
pub const ENABLE_LINE_INPUT: u32 = 2u32
The ReadFile or ReadConsole function returns only when a carriage return character is read. If this mode is disabled, the functions return when one or more characters are available.
Sourcepub const ENABLE_ECHO_INPUT: u32 = 4u32
pub const ENABLE_ECHO_INPUT: u32 = 4u32
Characters read by the ReadFile
or ReadConsole
function are written to the active screen buffer as they are read.
This mode can be used only if the ENABLE_LINE_INPUT
mode is also enabled.
Sourcepub const ENABLE_WINDOW_INPUT: u32 = 8u32
pub const ENABLE_WINDOW_INPUT: u32 = 8u32
User interactions that change the size of the console screen buffer are reported in the console’s input buffer.
Sourcepub const ENABLE_MOUSE_INPUT: u32 = 16u32
pub const ENABLE_MOUSE_INPUT: u32 = 16u32
If the mouse pointer is within the borders of the console window and the window has the keyboard focus, mouse events generated by mouse movement and button presses are placed in the input buffer.
Sourcepub const ENABLE_INSERT_MODE: u32 = 32u32
pub const ENABLE_INSERT_MODE: u32 = 32u32
When enabled, text entered in a console window will be inserted at the current cursor location and all text following that location will not be overwritten. When disabled, all following text will be overwritten.
Sourcepub const ENABLE_QUICK_EDIT_MODE: u32 = 64u32
pub const ENABLE_QUICK_EDIT_MODE: u32 = 64u32
This flag enables the user to use the mouse to select and edit text.
Sourcepub const ENABLE_EXTENDED_FLAGS: u32 = 128u32
pub const ENABLE_EXTENDED_FLAGS: u32 = 128u32
Required to enable or disable extended flags. See ENABLE_INSERT_MODE
and ENABLE_QUICK_EDIT_MODE
.
link: https://docs.microsoft.com/en-us/windows/console/setconsolemode#parameters
Sourcepub const ENABLE_VIRTUAL_TERMINAL_INPUT: u32 = 512u32
pub const ENABLE_VIRTUAL_TERMINAL_INPUT: u32 = 512u32
Setting this flag directs the Virtual Terminal processing engine to convert user input received by the console window
into Console Virtual Terminal Sequences that can be retrieved by a supporting application
through ReadFile
or ReadConsole
functions.