# The &klipper; Handbook

&Philip.Rodrigues; &Philip.Rodrigues.mail;
&Carsten.Pfeiffer; &Carsten.Pfeiffer.mail;
2000-2003 &Philip.Rodrigues;
&FDLNotice;
2022-05-05
Plasma 5.25

&klipper; is the &plasma; clipboard cut & paste utility.

KDE Klipper kdebase clipboard

## Introduction

&klipper; is the &plasma; clipboard utility. It stores clipboard history, and allows you to link clipboard contents to application actions. Please report any problems or feature requests to KDEs bugzilla.

## Using &klipper;

### Basic Usage

You can use &klipper; in the systemtray either as &plasma; widget or classic application. Both share the same functionality but have a different &GUI; and show the last item of the history when hovering the &klipper; icon in the systemtray:

The &klipper; icon.
The &klipper; icon

The &klipper; widget is hidden if the clipboard is empty.

To display the clipboard history, click on the &klipper; icon in the systemtray.

#### &klipper; Widget

The &klipper; Widget.
The &klipper; Widget

Hover an entry with the mouse pointer and four icons appear which enable you to invoke an action, show the barcode, edit the content or remove the entry from the history. Use &spectacle; to capture the barcodes and save them.

You can search through the clipboard history by opening it (click on &klipper;) and typing your query. The results are updated as you type. To clear the clipboard history click on the icon at the right of the search field.

The Configure Clipboard... action in the context menu opens the settings dialog.

### Actions

&klipper; can perform actions on the contents of the clipboard, based on whether they match a particular regular expression. For example, any clipboard contents starting with http:// can be passed to Firefox or &konqueror; as &URL;s to open. In addition, if the contents matches a path, similar actions can be performed according to the file's type. ⪚, if the path to a PDF file is copied to the clipboard, the file can be viewed in &okular;.

To use this feature, just select a &URL; or path. If there is a matching regular expression in &klipper;'s list, a menu will appear showing you the programs for your selection. Use the mouse or cursor keys to select a program, and &klipper; will run this program, opening the address pointed to by the selection.

You can change the time that the menu remains for in the settings dialog, with the option Show action popup menu under the General page. You can separately disable the file path part using the option Include MIME actions under the Action Menu page.

Actions can be disabled completely by pressing the shortcut &Ctrl;&Alt;X.

Clipboard contents which match a regular expression can also be edited before performing an action on them. Select Edit contents... at the right of the clipboard entry, and you can change the clipboard contents in the dialog which appears, before clicking the OK button to run the appropriate action.

Pressing &Ctrl;&Alt;R shows the pop-up menu to repeat the last action which &klipper; performed.

### Clipboard/Selection Behavior

#### General

&klipper; can be used to set the behavior of the clipboard and selection in &plasma;.

The &X-Window; uses two separate clipboard buffers: the selection and the clipboard. Text is placed in the selection buffer by simply selecting it, and can be pasted with the middle mouse button. To place text in the clipboard buffer, select it and press &Ctrl;X or &Ctrl;C . Text from the clipboard buffer is pasted using &Ctrl;V or by selecting Paste in a context menu.

#### Changing Clipboard/Selection Behavior

In order to change clipboard/selection behavior, select Configure Clipboard... from the &klipper; context menu, and in the dialog box that appears, select the General page. Unchecking Selection and Clipboard makes the clipboard and selection function as completely separate buffers as described above. With this option set, the option Ignore will prevent &klipper; from including the contents of the selection in its clipboard history and from performing actions on the contents of the selection. Selecting Selection and Clipboard causes the clipboard and selection buffers to always be the same, meaning that text in the selection can be pasted with either the middle mouse button or the key combination &Ctrl;V , and similarly for text in the clipboard buffer.

## Configuring &klipper;

### General Options

Selection and Clipboard

  When text or an area of the screen is highlighted with the mouse or keyboard, this is the selection. It can be pasted using the middle mouse button.

  If the selection is explicitly copied using a Copy or Cut action, it is saved to the clipboard. It can be pasted using a Paste action.

  When turned on this option keeps the selection and the clipboard the same, so that any selection is immediately available to paste by any means. If it is turned off, the selection may still be saved in the clipboard history (subject to the options below), but it can only be pasted using the middle mouse button.

Clipboard history

  Toggles clipboard history.

Number of entries

  Sets the number of items that are stored in the clipboard history.

Text selection

  When an area of the screen is selected with mouse or keyboard, this is called the selection. This option determines whether text selections are saved in the clipboard history. It is possible to choose between Always save in history and Only when explicitly copied. The Always save in history option is not available if selection/clipboard synchronisation is turned off ‐ in this case the selection is never automatically saved in the clipboard history. See .

Non-text selection

  This option determines whether non-text selections (such as images) are saved in the clipboard history. It is possible to choose between Always save in history, Only when explicitly copied, and Never save in history. The Always save in history option is not available if selection/clipboard synchronisation is turned off ‐ in this case the selection is never automatically saved in the clipboard history. See .

### Action Menu

Show action popup menu

  Set the time that a popup menu will remain for if you do nothing with it.

Replay actions on an item selected from history

  If this is switched on, selecting an item from the history causes &klipper; to display the actions pop-up on that item, if appropriate.

Remove white space when executing actions

  If selected, any white space (spaces, tabs, &etc;) at the beginning and end of the clipboard contents will be removed before passing the clipboard contents to an application. This is useful, for example, if the clipboard contains a &URL; with spaces which, if opened by a web browser, would cause an error.

Include MIME actions

  If selected, include applications that can accept its &MIME; type of a file name or URL selected in the popup menu.

### Actions Configuration

Editing Expressions/Actions

  On the Actions page, double-click the regular expression or action that you want to edit or select it and press the Edit Action button. A dialog will appear in which the expression text can be edited as you wish.

Adding Expressions/Actions

  Click the Add Action... button to add a regular expression for &klipper; to match. &klipper; uses &Qt;'s QRegularExpression, which uses PCRE (Perl Compatible Regular Expressions).

  You can add a description of the regular expression type (⪚ HTTP URL) by left clicking in the Description column.

  You can find detailed information about the use of QRegularExpression regular expressions in the Qt upstream documentation.

  Edit the regular expression as described above. To add a command to execute, click Add Command and edit the command in an in-place text editing box. Double-clicking on a command allows you to edit it.

  Note that %s in the command line is replaced with the clipboard contents, ⪚ if your command definition is ``kwrite` %s` and your clipboard contents are `/home/phil/textfile`, the command ``kwrite` `/home/phil/textfile`` will be run. To include %s in the command line, escape it with a backslash, as so: `\%s`.

  Entries `%0` through `%9` will be replaced by the corresponding captured texts from the match pattern.

### Shortcuts Options

The shortcuts page allows you to change the keyboard shortcuts which are used to access &klipper; functions. You can change the shortcut to one of three things:

None

  The selected action cannot be accessed directly from the keyboard

Default

  The selected action uses &klipper;'s default key. These are the shortcuts referred to in this manual.

Custom

  The selected action is assigned to the keys you choose.

  To choose a custom key for the action you have selected, click on Custom and then None. Now type the desired key combination on your keyboard, as in any &kde; application.

If you define a shortcut for Open Klipper at Mouse Position pressing this shortcut will open the &klipper; popup menu at the position of the mouse cursor, instead of their default position (in the &plasma; Panel). Useful if you use the mouse more than the keyboard.

## Credits and License

&klipper;

Program copyright 1998 &Andrew.Stanley-Jones; asj@cban.com

Program copyright 1998-2000 &Carsten.Pfeiffer; &Carsten.Pfeiffer.mail;

Currently maintained by Esben Mose Hansen. See http://mosehansen.dk/about for contact details.

Documentation copyright 2000-2003, 2005 &Philip.Rodrigues; &Philip.Rodrigues.mail;

&underFDL; &underGPL;
&documentation.index;