• palordrolap@fedia.io
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    1 day ago

    Ctrl+C and Ctrl+V for copy and paste come from non-Unix (I’d say Windows itself, but they may have stolen it from elsewhere), and so it makes sense that those two keys have other special meanings under Unix and its descendants.

    Specifically, they mean “Stop what you’re doing” and “The next character is to be entered without special meaning” in most shells, the most common programs that run, often as the main program, in/on a terminal.

    As such, most terminal emulators in Linux GUIs reserve those keypresses for their Unix-y functions. Most of the good ones move copy and paste to Ctrl+Shift+C and Ctrl+Shift+V instead.

    MS-DOS and Windows command prompts also inherit their use of Ctrl+C from Unix, by way of 86-DOS and CP/M, and were in there long before Microsoft adopted Ctrl+C for copy in a GUI, which is where those other Insert-based keybinds you mention came in.

    For an example of Unix Ctrl+V, try echo hello[Ctrl+V][Ctrl+H]world in a Linux terminal shell and press Enter. You’ll see the command as echo hello^Hworld and when you press Enter, it will display hellworld, because that embedded Ctrl+H is a backspace.