PuTTY how to select text and copy text using keyboard ONLY

Is there any way of selecting a text with keyboard the way I do it normally using Shift+arrows.


From the PuTTY manual:

PuTTY's copy and paste works entirely with the mouse. In order to copy text to the clipboard, you just click the left mouse button in the terminal window, and drag to select text. When you let go of the button, the text is automatically copied to the clipboard. You do not need to press Ctrl-C or Ctrl-Ins; in fact, if you do press Ctrl-C, PuTTY will send a Ctrl-C character down your session to the server where it will probably cause a process to be interrupted.


control+insert = copy

shift+insert = paste


so far as I know, there is no means of copying a selected area from the putty window to the Windows clipboard without using the mouse. there is a feature request on the putty site specifically for this functionality.

http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/keyboard-copy.html

the only way to copy information from the putty window to the Windows clipboard with a keyboard shortcut is to use the app system menu "copy all to clipboard" (which you can invoke from alt-space, provided you set the "Window > Behavior > System menu appears on ALT-Space" option configured in putty.

Pasting from the Windows clipboard into putty can be done with Shift-Insert.

If you need to copy and paste only within the terminal window itself, refer to either the man page for the shell you're using or consider using the unix "screen" app ('man screen' for more info), which allows text selection for copy / paste within the terminal window (similar to how vi's copy / paste works). an excerpt from the man pages:

   C-a esc     (copy)        Enter copy/scrollback mode.

   C-a ]       (paste .)     Write the contents of the paste buffer to the
                             stdin queue of the current window.

   C-a {
   C-a }       (history)     Copy and paste a previous (command) line.

   C-a >       (writebuf)    Write paste buffer to a file.

   C-a <       (readbuf)     Reads the screen-exchange file into the paste
                             buffer.

   C-a =       (removebuf)   Removes the file used by C-a < and C-a >.

I was tired of scrolling down line by line via mouse left button to copy session output. But now, i need to click on middle button twice; first at the beginning and second at the end. How I did :

  1. Go to Putty Configuration window
  2. Choose "Selection" from category on the left of the window.
  3. Under 'Control use of mouse', choose 'Compromise (Middle extends, Right pastes)' if not already chosen.

I use GNU screen,

I also have this in my screenrc to play nicely with vim:

register [ "\033:se paste\015a"
register ] "\033:se nopaste\015a\033"
bind ^] paste [.]

A friend of mine has a hook in screen to copy the "screen clipboard" to one or both of the x clipboards (selection or clipboard) and I believe putty does the needed translations. I'll try to dig it up.

You can probably arrange the same thing with xclip, the incantation you're looking for should be using xclip -selection clipboard

I'd test quickly to see if xclip -selection clipboard -o spits out the contents of your clipboard.