I'm running Emacs under PuTTY and this works better then I expected. But since I sometimes use the mouse to focus the PuTTY window, I turned xterm-mouse-mode on. This way the focus in the text changes to where I click.

But now I can't past text into putty anymore. Normally this is done by a right click and then putty sends the copied text. But now Emacs receives a mouse-3 event first.

Is it possible to map mouse-3 to something so that the text after the mouse event is pasted to Emacs?

Here is my current config: https://github.com/r03/dotfiles/blob/master/.emacs.d/init.el

1 Answer 1


If mouse reporting is on, then Shift+click is still interpreted by the terminal and not passed to the application. Thus, if a right-click pastes outside Emacs, and a straight right-click is passed through to Emacs, then Shift+right-click should paste in Emacs.

Passthrough of Shift+click can be disabled, check that it's enabled.

This applies to PuTTY and many other terminal emulators. (I think they all follow suit from xterm, as is often the case.)

  • Thanks, I didn't know about shift+right-click. Works perfect.
    – roeland
    Mar 10, 2016 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.