15

I'm using Ubuntu 14.04 LTS with Unity right now. I've changed my copy and paste keys to Ctrl + C and Ctrl + V respectively.

The command I've used is this:

gconftool-2 -t str -s /apps/gnome-terminal/keybindings/copy "<Control>c"

Now I'm looking for a way to change the interrupt / kill process key from Ctrl + C to (for example) Ctrl + I. The problem is that I can't find the appropriate keybinding name for it.

Any help would be appreciated.

Tim
  • 32,274
  • 27
  • 118
  • 177
Jonas Sanoj
  • 151
  • 1
  • 1
  • 3
  • 1
    I'm pretty sure you didn't need to issue that command to do that. I changed my copy and paste keybinds to `ctrl+c` and `ctrl+v` by going to Edit > Keyboard shortcuts (or something like this, I'm not on Linux right now). I am also almost sure you can change the keyboard interrupt key there, if you can't, `ctrl + alt + C` might do a key interrupt now. – Bruno Finger May 07 '15 at 15:37
  • @mark kirby That's exactly what I want to do. Sorry if I hadn’t stated that clear enough. – Jonas Sanoj May 07 '15 at 15:41
  • OK, writing an easy answer now – Mark Kirby May 07 '15 at 15:41
  • 2
    Did some comment got deleted here? Because I think I'm missing something. But anyway, I meant that for `gnome-terminal`. If you go to `Edit > Preferences > Shortcuts` you can change almost every keybind there. Unfortunately, you can't change the keyboard interrupt, but after I changed my `copy` to `ctrl + c`, the keyboard interrupt became `ctrl + alt + c`. Hope that helps. I didn't write that as an answer because it doesn't answer your original question of how to change the keyboard interrupt keybind. – Bruno Finger May 07 '15 at 15:55
  • Why do you need to do that? Personal preference or...? – Tim May 07 '15 at 16:26
  • @Tim it's just a personal preference. – Jonas Sanoj May 07 '15 at 17:16
  • Updated the answer to reflect your question better – Mark Kirby May 07 '15 at 19:57

2 Answers2

22

The key combo was changed to Ctrl + Alt + C by default.

Also Alt + F4 is will kill the foreground task (same as clicking the cross).

To change the interrupt key to ctrl + I

stty intr ^i

Just change the "i" to any other letter you want and to see all terminal shortcuts you can run

stty -a

There is a very good answer explaining this here, ignore the title and read the first answer.

Mark Kirby
  • 18,289
  • 19
  • 78
  • 113
  • 1
    That is a very helpful answer: would you happen to know how to change the interrupt key combination in termial to `ctrl+shift+c`? In previous iterations of terminal, changing copy to `ctrl+c` automatically did this. But now it appears to be `ctrl+alt+c`. – Rsync Oct 26 '17 at 02:06
0

sudo vi /usr/share/X11/xkb/symbols/ctrl

Change the section // Map Ctrl to the left Alt key, Alt to the left Win key, // and Super to the left Ctrl key.

whey it says "replace key " with

replace key <LCTL> { [ ISO_Level3_Shift ] };

On your shell configuration script write

stty intr 0xA2

Open Tweaks On Aditional Layout Options -> Ctrl , mark "Map Ctrl to the left Alt key, Alt to the left Win key, and Super to the left Ctrl key."

Then on gnome-terminal remap the copy and paste to ctrl c and ctrl v that shoyuld be "Ctrl C" "Ctrl V"

Then move physically your keys to make sense