How to write ^C at in the Windows console? For example, I need to enter ^C in this window. If you press Ctrl+C in the console, the application exits and the console closes.
Asked
Active
Viewed 62 times
-5
-
1Can't you write it as two separate symbols? – HolyBlackCat Jul 08 '18 at 08:44
-
You mean you want to know the key sequence to enter that `^C` appears in the console? – πάντα ῥεῖ Jul 08 '18 at 08:44
-
I need this no two separate symbols – Nihat Eliyev Jul 08 '18 at 08:45
-
https://learn.microsoft.com/en-us/windows/console/ctrl-c-and-ctrl-break-signals (in an app written by you yourself). – Paul Sanders Jul 08 '18 at 08:48
-
this isn't c++ code – Nihat Eliyev Jul 08 '18 at 08:49
-
@πάνταῥεῖ this is what I need in c++ cmd terminal – Nihat Eliyev Jul 08 '18 at 08:50
-
Why did you choose that tag then? – πάντα ῥεῖ Jul 08 '18 at 08:50
-
what can I choose? – Nihat Eliyev Jul 08 '18 at 08:50
-
type `^` (nothing appears on screen), then type `C` (`^C` appears) – Stephan Jul 08 '18 at 09:01
-
This question has nothing to do with the CMD shell. You're running an executable named sdfdsf.exe that's attached to a console window. This window is hosted by an instance of the console host process. In Windows 7+, the console host is conhost.exe. In older versions it's hosted in csrss.exe. The client process, sfddsf.exe, uses the Windows console API (e.g. `GetConsoleScreenBufferInfo`) and standard I/O (e.g. `ReadFile`, `WriteFile`) to interact with the console. In Windows 8+, console I/O is implemented using the condrv.sys device driver. In older versions it uses an [A]LPC port. – Eryk Sun Jul 08 '18 at 09:26