xtd 0.2.0
Loading...
Searching...
No Matches

◆ treat_control_c_as_input() [2/2]

static void xtd::console::treat_control_c_as_input ( bool  treat_control_c_as_input)
static

Sets a value indicating whether the combination of the Control modifier key and C console key (Ctrl+C) is treated as ordinary input or as an interruption that is handled by the operating system.

Parameters
treat_control_c_as_inputtrue if Ctrl+C is treated as ordinary input; otherwise, false.
Remarks
If the value of the treat_control_c_as_input property is false and Ctrl+C is pressed, the pressed keys are not stored in the input buffer and the operating system terminates the currently executing process. This is the default value.
Warning
Use this property judiciously because setting it to true has such a dramatic effect. Most users expect Ctrl+C to terminate a console application. If you disable the effect of Ctrl+C, the user must remember to use Ctrl+Break to terminate the application, which is a less familiar key combination.