How do I paste the Windows clipboard into my PuTTY session, using only the keyboard?

136

31

I would like to paste text the Windows clipboard into my PuTTY session using only the keyboard. I am running PuTTY 0.60 on Windows XP.

Usage example: I just selected a bunch of nice text inside of my Emacs on Windows. I then shift my focus to a Putty window. Then I press the magic keyboard shortcut, and the application waiting for input on the other side gets some.

I have tried the keyboard shortcut to paste into cmd, Alt+Space+E+P, but it doesn't paste the clipboard into my PuTTY window.

This question and answer about opening the system menu using Alt+Space looks interesting, but it doesn't bring me closer to an answer.

So, does anyone know how can I paste the Windows clipboard into my PuTTY session using only the keyboard?

piyo

Posted 2010-08-24T13:46:01.357

Reputation: 1 611

Answers

187

You can use Shift+Ins to paste text.

From PuTTY documentation:

Pasting is done using the right button (or the middle mouse button, if you have a three-button mouse and have set it up; see section 4.11.2). (Pressing Shift-Ins, or selecting ‘Paste’ from the Ctrl+right-click context menu, have the same effect.) When you click the right mouse button, PuTTY will read whatever is in the Windows clipboard and paste it into your session, exactly as if it had been typed at the keyboard.

whitequark

Posted 2010-08-24T13:46:01.357

Reputation: 14 146

5Looking at my Macbook air keyboard and windows installed, I wish I had an INS key. – adrianTNT – 2016-05-10T14:54:57.213

Hey, @adrianTNT , on your Macbook, you can simulate Ins with fn+return. So to paste into putty, you can use shift+fn+return – Jamey – 2016-11-02T17:38:57.403

3BE CAREFUL DOING THIS. Some characters like " may look the same but be interpreted differently once you paste it into PuTTY - and this was copy pasting from notepad++ so it was plain text – Kolob Canyon – 2016-11-10T19:12:06.383

@KolobCanyon yeah I noticed! copying from my editor directly to PuTTY always transformed the text, need to always "transform" to plain text by pasting to notepad before – pocesar – 2017-09-18T08:30:29.567

4In Windows, just right-clicking the PuTTY console window with the mouse and then hitting enter on the keyboard worked for me. (Note that you obviously need to Copy the password to the clipboard first.) – c00000fd – 2017-09-25T04:31:16.537

1

In my case I want Ctrl-Ins / Shift-Ins only, thus, my config was:

  • Window > Selection
    • Auto-copy selected text to system clipboard > (unchecked)
    • Mouse Paste > (No action)
    • {Ctrl,Shift}+Ins > (System clipboard)

You need this to VIM works:

  • Terminal > Features
    • Disable application keypad mode (checked)

Extra:

PuTTY operates just like a normal X terminal... Some commands will output to an "alternate" screen when the xterm terminal type is selected, such as "less" (or "vi"), which dissapears when the program exits.

However, you can disable the alternate screen with:

  • Terminal > Features
    • Disable switching to alternate terminal screen (checked)

ggrandes

Posted 2010-08-24T13:46:01.357

Reputation: 111

0

From the Putty Documentation

4.10.3 Changing the actions of the mouse buttons PuTTY's copy and paste mechanism is modelled on the Unix xterm application. The X Window System uses a three-button mouse, and the convention is that the left button selects, the right button extends an existing selection, and the middle button pastes.

Windows typically only has two mouse buttons, so in PuTTY's default configuration, the right button pastes, and the middle button (if you have one) extends a selection.

If you have a three-button mouse and you are already used to the xterm arrangement, you can select it using the "Action of mouse buttons" control.

You have to change the default behavior by opening Putty > Windows > Selection > Select "xterm (Right extends, middle pastes)"

Jimmy D

Posted 2010-08-24T13:46:01.357

Reputation: 1