3 ms·
The ctrl-c for interrupt is a default of terminal, it can be changed with stty. Eg "stty intr ^g" will make the terminal interpret a ctrl-g character as a signa
by fulafel 6y ago
The ctrl-c for interrupt is a default of terminal, it can be changed with stty. Eg "stty intr ^g" will make the terminal interpret a ctrl-g character as a signal to generate the interrupt signal.
(And Linux the OS doesn't have any opinion on GUI terminal keybindings. You may be tempted to point your finger of blame towards X11 next, but X11 traditionally the text selection is mouse based with implicit copy on select - paste defaults to shift-insert in the bundled X11 terminal emulator.
The shift-ctrl-c charade was created by gnome-terminal I think)
- fulafel 6y agoTo me precise about ctrl-c being default of the terminal meant in this context: it's the default of the Linux kernel tty driver. Which is a different thing from the terminal emulation program. So stty manipulates the kernel tty settings with system calls without involvement of the terminal emulation program like xterm or gnome-terminal. And what interprets the ^C / ^G in this case is also the kernel.