Control-C

Control+C is a common computer command. It is generated by pressing the C key while holding down the Ctrl key on most computer keyboards.

In graphical user interface environments that use the control key to control the active program, control+C is often used to copy highlighted text to the clipboard.[1]

In many command-line interface environments, control+C is used to abort the current task and regain user control.[2] It is a special sequence which causes the operating system to send a signal to the active program. Usually the signal causes it to end, but the program may "catch" it and do something else, typically returning control to the user.

In graphical environments

Ctrl+C was one of a handful of keyboard sequences chosen by the program designers at Xerox PARC to control text editing, with Ctrl+Z (Undo), Ctrl+X (Cut), Ctrl+V (Paste), and Ctrl+P (Print). The first four letters are all located together at the left end of the bottom row of the standard QWERTY keyboard, and P towards the upper right. The equivalent key combination on Macintosh computers is ⌘-C.

In command-line environments

Control+C ("C for Cancel")[3] was part of various Digital Equipment operating system, including TOPS-10 and TOPS-20. Its popularity as an abort command was adopted by other systems including Unix. Other systems that copied it include CP/M, MS-DOS and Microsoft Windows. In POSIX systems, the sequence causes the active program to receive SIGINT, the interruption signal. If the program does not specify how to handle this condition, it is terminated. Typically a program which does handle a SIGINT will still terminate itself, or at least terminate the task running inside it.

This system is usually preserved even in graphical terminal emulators. If control-C is used for copy-and-paste in the graphical environment, an ambiguity arises. Typically an alternate keystroke is assigned to one of the commands, and both appear in the emulator's menus.

As many keyboards and computer terminals once directly generated ASCII code, the choice of control+C overlapped with the ASCII end-of-text character. This character has a numerical value of three, as "C" is the third letter of the alphabet. It was chosen to cause an interrupt as it is otherwise unlikely to be part of a program's interactive interface. Many other control codes, such as control+D for the end-of-transmission character, do not generate signals and are occasionally used to control a program.

gollark: With you.
gollark: I disagree then.
gollark: And with SPACE COURT.
gollark: I agree with heav.
gollark: A SPACE COURT ruling said so.

See also

References

  1. "Why Ctrl+v for Paste?". control+C and control+V to do ... copy and paste
  2. "A Buffer Overflow Exploit Against the DameWare Remote Control software". December 19, 2003. As soon as the command shell is closed with a control-c combination ...
  3. "Creating the Living Network". December 16, 2019. you can hit control-C to cancel
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.