19

Kitty is a terminal for Linux. How do I copy and paste with it. CTRL+c does not work? And there is no option on right click. Right-click also doesn't work for copy.

Evan Carroll
  • 28,578
  • 45
  • 164
  • 290

7 Answers7

20

Kitty

You need to use a capital C. To copy and paste in

  1. Select text
  2. Press CTRL+SHIFT+C
  3. Paste with SHIFT+INSERT in any app.

There is no method to copy with the cursor.

Vim

Because things like VIM keep coming up. If you have Neovim installed (which is basically better vim). You can easily copy to your Xorg/Wayland buffer by selecting into the + buffer with "+y. This has the advantage of skipping over things that should not be copied, like hints,

Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
9

We can also configure the feature copy on select which will copy selected text into clipboard without pressing a shortcut:

copy_on_select yes

To paste the text from clipboard, you can use the middle mouse click or set up the shortcut you want, for example:

map cmd+c        copy_to_clipboard
map cmd+v        paste_from_clipboard
map shift+insert paste_from_clipboard
jdhao
  • 606
  • 12
  • 29
1

You can configure the keyboard shortcuts.

To make Ctrl+C copy, you would put this in your kitty.conf:

map ctrl+c        copy_to_clipboard
Mikel
  • 56,387
  • 13
  • 130
  • 149
1

From the comments in Kitty's default configurations:

#::  There is also a copy_or_interrupt action that can be optionally
#::  mapped to Ctrl+c. It will copy only if there is a selection and
#::  send an interrupt otherwise. Similarly,
#::  copy_and_clear_or_interrupt will copy and clear the selection or

This does what I need:

map ctrl+c copy_and_clear_or_interrupt
map ctrl+v paste_from_clipboard
Ian Mutawa
  • 111
  • 3
1

As for Kitty 0.28.1-2 now, you may use scrollback mode, like tmux's copy mode, with a default keyboard shortcut Ctrl+Shift+h. The mode will read the whole context of the current tty with a default pager less, then you can copy whatever you like, if you know how to copy text in the pager. Ctrl+Shift+g read the last shell output with the pager.

You may set scrollback_pager as your favourite pager in config too, like a powerful page which can take Neovim's advantages even.

AdminBee
  • 21,637
  • 21
  • 47
  • 71
0

Also note this very nice Kitten plug-in https://github.com/yurikhan/kitty_grab that lets you copy with the keyboard.

cayhorstmann
  • 221
  • 2
  • 3
-2

The accepted answer says:

You need to use a capital C. To copy and paste in

  1. Select text
  2. Press Ctrl+Shift+C
  3. Paste with Shift+Insert in any app.

There is no method to copy with the cursor.

Right and wrong, there is a method for the mouse.  Shift+RightMouseClick works also to paste.

del
  • 1