# The &klipper; Handbook

Philip
Rodrigues

    philip.rodrigues@libertysurf.co.uk

Carsten
Pfeiffer

    pfeiffer@kde.org

Developer
Lauri
Watts

    vampyr@atconnex.net

Reviewer
2000
Philip Rodrigues
&FDLNotice;
28/01/2001
2.00.00

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

KDE
Klipper
kdebase
clipboard

## Introduction

&klipper; is the KDE clipboard utility. It stores clipboard history, and allows you to link clipboard contents to application actions. Please report any problems or feature requests to Carsten Pfeiffer pfeiffer@kde.org.

### &klipper; Revision History

- 2.0.1 - Added timeout to remove &klipper; menu if nothing is done with clipboard text.

- 2.0 - Released with KDE 2.0. Added configuration dialog, saving of history on exit and actions

- 1.0 - first public release

## Using &klipper;

### Basic Usage

To display the clipboard history, click on the &klipper; icon, or press Ctrl Alt V . Previous clipboard entries are shown at the bottom of the popup menu which appears. Selecting one of these copies it to the clipboard, from where it can be pasted into any KDE or X application as usual.

### 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 Netscape or &konqueror; as &URL;s to open.

To use this feature, just copy a &URL; or filename to the clipboard. If there is a matching regular expression in &klipper;'s list, a menu will appear showing you the options you have (&eg; Open &URL; in &konqueror;, open &URL; in &Netscape;). Use the mouse or keyboard to select the option you want, and &klipper; will run the program you have selected, opening the address pointed to by the clipboard contents.

If you do not want to perform any actions on the clipboard contents, select Do Nothing on the popup menu to return to what you were doing before.If you leave the menu, it will disappear, leaving you to continue your work.You can change the time that the menu remains for in the Preferences dialog, and the option Timeout for action popups under the General tab.

Actions can be disabled completely by clicking on &klipper; and selecting Actions Enabled, or by pressing &Ctrl;&Alt;V followed by &Ctrl;&Alt;X.

Clipboard contents which match a regular expression can also be edited before performing an action on them. Select Edit and process again on the &klipper; popup menu, 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 popup menu to repeat the last action which &klipper; performed.

## Configuring Klipper

### Viewing Options

To view or change &klipper;'s settings, bring up the &klipper; popup menu, and select Configuration. The &klipper; Configuration Dialog will appear. Its contents are described below.

#### General Options

Popup menu at mouse-cursor position

  Make the &klipper; popup menus appear at the position of the mouse cursor, instead of their default positions of in the KDE Panel. Useful if you use the mouse more than the keyboard.

Save clipboard contents on Exit

  Makes &klipper; keep the contents of the clipboard history on exit, and restore them next time it is run.

Timeout for Action popups

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

#### Action Options

Editing Expressions/Actions

  On the Actions tab, click the regular expression or action that you want to edit. A small box will appear in which the text can be edited as you wish. Make sure you press Enter when you are done.

Adding Expressions/Actions

  Click the Add Action button to add a regular expression for &klipper; to match. &klipper; uses Qt's `QRegExp`, which understands most regular expressions as you would use in grep or egrep for instance.

  You can find detailed information about the use of `QRegExp` regular expressions at http://doc.trolltech.com/qregexp.html#details. Note that &klipper; does not support the wildcard mode mentioned on this page.

  Edit the regular expression as described above. To add a command to execute, right click, select Add Command and edit the command which appears in the tree under the regular expression.

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

#### Shortcut Options

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

No Key

  The selected action cannot be accessed directly from the keyboard

Default Key

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

Custom Key

  The selected action is assigned to the keys you choose.

  To choose a custom key for the action you have selected, click on the representation of a key in the lower right of the screen to activate it, and type the desired key on your keyboard. Your chosen key may be optionally be combined with one or more of the Shift, &Ctrl;, or &Alt; modifier keys, by activating the corresponding option.

## Credits and License

Klipper

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

Program copyright 1998-2000 Carsten Pfeiffer pfeiffer@kde.org

Currently maintained by Carsten Pfeiffer

Documentation copyright 2000 Philip Rodrigues philip.rodrigues@libertysurf.co.uk

&underFDL; &underGPL;

## Installation

### How to obtain &klipper;

&klipper; is part of the KDE project http://www.kde.org. &klipper; can be found in the kdebase package on ftp://ftp.kde.org/pub/kde/, the main ftp site of the KDE project.

### Requirements

In order to run &klipper;, you need KDE 2.

All required libraries can be found on the KDE ftp site.

### Compilation and installation

&klipper; should compile and install along with the kdebase package, and appear on your KDE panel (&kicker;) when you run KDE 2.

Klipper icon
Screenshot

To disable this, simply remove the reference to &klipper; from your `$KDEDIR/bin/startkde` file