4 ms·
On Linux I usually use Ctrl+Shift+C, Ctrl+Shift+V which seems to be bound by default on most terminals. Ctrl+C of course terminates the running program, usually
by tokenizerrr 10y ago
On Linux I usually use Ctrl+Shift+C, Ctrl+Shift+V which seems to be bound by default on most terminals. Ctrl+C of course terminates the running program, usually.
- skykooler 10y agoWhy is ctrl-C the shortcut for "terminate", anyway? I would have expected it to be something like ctrl-T.
- deleted 10y ago[deleted]
- jaredsohn 10y agofrom wikipedia (https://en.wikipedia.org/wiki/Control-C https://en.wikipedia.org/wiki/Control-C): 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. Also see https://en.wikipedia.org/wiki/C0_and_C1_control_codes#STX https://en.wikipedia.org/wiki/C0_and_C1_control_codes#STX
- Symbiote 10y agoType man ascii and notice what is 0x40 less than the capital letter. H is 0x48, backspace is 0x08. ^H is the same as backspace. I is 0x49, tab is 0x09, ^I is the tab sequence. Now you know why Windows \r in text file show up as ^M in vi and Emacs. ^D is ASCII 0x04, "EOT (end of transmission)". That's why you use that to end input. ^C is ASCII 0x03, whose name is "ETX (end of text)". That seems a reasonable choice.