<othercredit role="translator"><firstname>John</firstname><surname>Knight</surname><affiliation><address><email>anarchist_tomato@herzeleid.net</email></address></affiliation><contrib>Conversion to British English</contrib></othercredit>
<para>&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 &Carsten.Pfeiffer.mail;.</para>
<para>To display the clipboard history, click on the &klipper; icon in the &kde; panel, or press <keycombo action="simul">&Ctrl;&Alt;<keycap>V</keycap> </keycombo>. Previous clipboard entries are shown at the top of the pop-up 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.</para>
<para>To remove &klipper; from your panel, open the pop-up menu and select <guimenuitem>Quit</guimenuitem>. A dialogue will ask you whether &klipper; should start automatically when you log in.</para>
<para>&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 <quote>http://</quote> can be passed to &Netscape; or &konqueror; as &URL;s to open.</para>
<para>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 (⪚ 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.</para>
<para>If you do not want to perform any actions on the clipboard contents, select <guimenuitem>Do Nothing</guimenuitem> on the pop-up 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 <guilabel>Configure Klipper...</guilabel> dialogue, with the option <guilabel>Timeout for action pop-ups</guilabel> under the <guilabel>General</guilabel> tab.</para>
<para>Actions can be disabled completely by clicking on &klipper; and selecting <guimenuitem>Actions Enabled</guimenuitem>, or by pressing <keycombo action="simul">&Ctrl;&Alt;<keycap>X</keycap></keycombo>.</para>
<para>Clipboard contents which match a regular expression can also be edited before performing an action on them. Select <guimenuitem>Edit contents...</guimenuitem> on the &klipper; pop-up menu, and you can change the clipboard contents in the dialogue which appears, before clicking the <guibutton>OK</guibutton> button to run the appropriate action.</para>
<para>Pressing <keycombo action="simul">&Ctrl;&Alt;<keycap>R</keycap></keycombo> shows the pop-up menu to repeat the last action which &klipper; performed.</para>
<para>&klipper; can be used to set the behaviour of the clipboard and selection in &kde;. </para>
<note><para>The &X-Window; uses two separate clipboard buffers: the <quote>selection</quote> and the <quote>clipboard</quote>. 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 <keycombo>&Ctrl;<keycap>X</keycap> </keycombo> or <keycombo>&Ctrl;<keycap>C</keycap> </keycombo>. Text from the clipboard buffer is pasted using <keycombo>&Ctrl;<keycap>V</keycap> </keycombo> or by selecting <menuchoice><guimenu>Edit</guimenu><guimenuitem>Paste</guimenuitem> </menuchoice>.</para>
<para>In order to change clipboard/selection behaviour, select <guimenuitem>Configure Klipper...</guimenuitem> from the &klipper; pop-up menu, and in the dialogue box that appears, select the <guilabel>General</guilabel> tab. Selecting <guilabel>Separate clipboard and selection</guilabel> makes the clipboard and selection function as completely separate buffers as described above. With this option set, the option <guilabel>Ignore selection</guilabel> 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 <guilabel>Synchronise contents of the clipboard and the selection</guilabel> causes the clipboard and selection buffers to always be the same, meaning that text in the selection can be pasted with either the <mousebutton>middle</mousebutton> mouse button or the key combination <keycombo>&Ctrl;<keycap>V</keycap> </keycombo>, and similarly for text in the clipboard buffer. </para>
<para>To view or change &klipper;'s settings, open the &klipper; pop-up menu, and select <guimenuitem>Configure Klipper...</guimenuitem>. The &klipper; configuration dialogue will appear. Its contents are described below.</para>
<term><guilabel>Popup menu at mouse-cursor position</guilabel></term>
<listitem><para>Make the &klipper; pop-up menus appear at the position of the mouse cursor, instead of their default position (in the &kde; Panel). Useful if you use the mouse more than the keyboard.</para></listitem>
<term><guilabel>Save clipboard contents on exit</guilabel></term> <listitem><para>If this option is on, the clipboard history will be saved when &klipper; exits, allowing you to use it next time &klipper; starts.</para>
<term><guilabel>Remove whitespace when executing actions</guilabel></term>
<listitem><para>If selected, any whitespace (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.</para>
<term><guilabel>Replay actions on an item selected from history</guilabel></term>
<listitem><para>If this is switched on, selecting an item from the history causes &klipper; to display the actions pop-up on that item, if appropriate.</para>
<listitem><para>If selected, the clipboard will never be empty: &klipper; will insert the most recent item from the clipboard history into the clipboard instead of allowing it to be empty.</para></listitem>
<listitem><para>On the <guilabel>Actions</guilabel> tab, double-click the regular expression or action that you want to edit. An in-place text editing box will appear in which the text can be edited as you wish. Make sure you press <keysym>Enter</keysym> when you are done.</para></listitem>
<listitem><para>Click the <guibutton>Add Action</guibutton> button to add a regular expression for &klipper; to match. &klipper; uses &Qt;'s <classname>QRegExp</classname>, which understands most regular expressions as you would use in <application>grep</application> or <application>egrep</application> for instance.</para>
<para>You can add a description of the regular expression type (⪚ <quote>HTTP URL</quote>) by <mousebutton>left</mousebutton> clicking in the <guilabel>Description</guilabel> column.</para>
<note><para>You can find detailed information about the use of <classname>QRegExp</classname> regular expressions at <ulink url="http://doc.trolltech.com/qregexp.html#details">http://doc.trolltech.com/qregexp.html#details</ulink>. Note that &klipper; does not support the wildcard mode mentioned on this page.</para></note>
<para>Edit the regular expression as described above. To add a command to execute, <mousebutton>right</mousebutton> click, select <guimenuitem>Add Command</guimenuitem> and edit the command which appears in the tree under the regular expression.</para>
<para>Note that <token>%s</token> in the command line is replaced with the clipboard contents, ⪚ if your command definition is <userinput><command>kedit</command> <token>%s</token></userinput> and your clipboard contents are <filename>/home/phil/textfile</filename>, the command <userinput><command>kedit</command> <filename>/home/phil/textfile</filename></userinput> will be run. To include <token>%s</token> in the command line, escape it with a backslash, as so: <userinput>\%s</userinput>.</para></listitem>
<listitem><para>Brings up the <guilabel>Disable Actions for windows of type WM_CLASS</guilabel> dialogue.</para>
<para>Some programs, such as &konqueror;, use the clipboard internally. If you get unwanted &klipper; pop-ups all the time when using a certain application, do the following:</para>
<listitem><para>Open the application.</para></listitem>
<listitem><para>From a terminal, run <userinput><command>xprop</command> | <command>grep</command> <parameter>WM_CLASS</parameter></userinput> and then click on the window of the application you are running.</para></listitem>
<listitem><para>The first string after the equals sign is the one to enter.</para></listitem>
<para>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:</para>
<listitem><para>The selected action is assigned to the keys you choose.</para>
<para>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 combination on your keyboard, as in any &kde; application. </para> </listitem>
<para>&klipper; should compile and install along with the tdebase package, and appear on your &kde; panel (&kicker;) when you run &kde; 3. If it does not appear, you can start it by selecting <menuchoice><guimenu>Panel Menu</guimenu><guisubmenu>Add</guisubmenu><guisubmenu>Applet</guisubmenu><guimenuitem>Klipper</guimenuitem> </menuchoice> in any context menu in &kicker;, the &kde; Panel.</para>