1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

Add GUI configuration for choice of clipboards.

On all platforms, you can now configure which clipboard the mouse
pastes from, which clipboard Ctrl-Ins and Shift-Ins access, and which
Ctrl-Shift-C and Ctrl-Shift-V access. In each case, the options are:

 - nothing at all
 - a clipboard which is implicitly written by the act of mouse
   selection (the PRIMARY selection on X, CLIP_LOCAL everywhere else)
 - the standard clipboard written by explicit copy/paste UI actions
   (CLIPBOARD on X, the unique system clipboard elsewhere).

Also, you can control whether selecting text with the mouse _also_
writes to the explicitly accessed clipboard.

The wording of the various messages changes between platforms, but the
basic UI shape is the same everywhere.
This commit is contained in:
Simon Tatham
2017-12-10 17:16:50 +00:00
parent 98fa733a96
commit 0e7f0883a9
9 changed files with 405 additions and 22 deletions

View File

@ -1469,6 +1469,68 @@ select a rectangular block. Using the \q{Default selection mode}
control, you can set \i{rectangular selection} as the default, and then
you have to hold down Alt to get the \e{normal} behaviour.
\S{config-clipboards} Assigning copy and paste actions to clipboards
Here you can configure which clipboard(s) are written or read by
PuTTY's various copy and paste actions.
The X Window System provides multiple clipboards (or \q{selections}),
and many applications support more than one of them by a different
user interface mechanism.
The two most commonly used selections are called \cq{PRIMARY} and
\cq{CLIPBOARD}; in applications supporting both, the usual behaviour
is that \cw{PRIMARY} is used by mouse-only actions (selecting text
automatically copies it to \cw{PRIMARY}, and middle-clicking pastes
from \cw{PRIMARY}), whereas \cw{CLIPBOARD} is used by explicit Copy
and Paste menu items or keypresses such as Ctrl-C and Ctrl-V.
On other platforms, where there is a single system clipboard, PuTTY
provides a second clipboard-like facility by permitting you to paste
the text you last selected in \e{this window}, whether or not it is
currently also in the system clipboard.
\S2{config-selection-autocopy} \q{Auto-copy selected text}
\cfg{winhelp-topic}{selection.autocopy}
The checkbox \q{Auto-copy selected text to system clipboard} controls
whether or not selecting text in the PuTTY terminal window
automatically has the side effect of copying it to the system
clipboard, without requiring a separate user interface action.
On X, the wording of this option is changed slightly so that
\cq{CLIPBOARD} is mentioned in place of the \q{system clipboard}. Text
selected in the terminal window will \e{always} be automatically
placed in the \cw{PRIMARY} selection, but if you tick this box, it
will \e{also} be placed in \cq{CLIPBOARD} at the same time.
\S2{config-selection-clipactions} Choosing a clipboard for UI actions
\cfg{winhelp-topic}{selection.clipactions}
PuTTY has three user-interface actions which can be configured to
paste into the terminal (not counting menu items). You can click
whichever mouse button (if any) is configured to paste (see
\k{config-mouse}); you can press Shift-Ins; or you can press
Ctrl-Shift-V, although that action is not enabled by default.
You can configure which of the available clipboards each of these
actions pastes from (including turning the paste action off
completely). On platforms with a single system clipboard, the
available options are to paste from that clipboard or to paste from
PuTTY's internal memory of the last selected text within that window.
On X, the options are \cw{CLIPBOARD} or \cw{PRIMARY}.
(\cw{PRIMARY} is conceptually similar in that it \e{also} refers to
the last selected text \dash just across all applications instead of
just this window.)
The two keyboard options each come with a corresponding key to copy
\e{to} the same clipboard. Whatever you configure Shift-Ins to paste
from, Ctrl-Ins will copy to the same location; similarly, Ctrl-Shift-C
will copy to whatever Ctrl-Shift-V pastes from.
\H{config-selection-words} The Words panel
PuTTY will \I{word-by-word selection}select a word at a time in the