Clipboard (software)
From Wikipedia, the free encyclopedia
The clipboard is a software program that is used for short-term storage of data as it is transferred between documents or applications, via copy and paste operations. It is most commonly a part of a GUI environment and is usually implemented as an anonymous, temporary block of memory that can be accessed from most or all programs within the environment.
Contents |
[edit] Basic Clipboard functions
The semantics of the clipboard facility varies from one operating environment to another, and can also vary between versions of the same system. They can sometimes be changed programmatically or by user preference. This can lead to user frustration when switching between environments with different clipboard semantics particularly as copy and paste operations often become embedded in the user's muscle memory.
Most environments support a single clipboard transaction. Each cut or copy overwrites the previous contents. Normally paste operations copy the contents, leaving the contents available in the clipboard for further pasting operations.
[edit] Clipboard data formats
Early implementations of the clipboard stored data as plain text without meta-information such as typeface, type style or color. More recent implemenations support the multiple flavors of data; a flavor is a type of data, allowing complex data structures to be stored. These range from styled text formats such as RTF or HTML, through a variety of bitmap and vector image formats to complex data types like spreadsheets and database entries.
For example cutting a range of cells in a spreadsheet and then pasting them into another sheet may preserve the underlying formulae and data, and may even translate intra-cell references, so that a "SUM(...)" calculation on a sub-range of the cells is converted to refer to the newly pasted copies of those cells.
Not all applications can interpret every flavor that a clipboard supports. Often applications will attempt to translate complex formats into simpler ones they can handle. Many text editors, for example, translate structured data from the clipboard into plain text. This is a common way for users to convert small selections of data into plain text for various purposes.
[edit] Clipboard Management
Modern GUIs often provide a clipboard manager which supports multiple cut and paste transactions. In this model the clipboard is treated as a stack or scrap book, with new cuts and copies being placed added to the top of the list of recent transations. The standard paste operation copies the most recent transaction, while specialized pastes provide access to the other stored transactions. These managers generally also provide a window that displays the transaction history and allows the user to select earlier copies, edit them, change their format and even search amongst them.
Most environments do not save the clipboard contents to any persistent storage - when a user logs out or reboots his or her system the clipboard contents are cleared and forgotten.
[edit] Operating System Specific Clipboards
[edit] Microsoft Windows
In newer versions of the Microsoft Windows operating system, the contents of the clipboard can be viewed at any time by using the ClipBook Viewer application (clipbrd.exe). In older versions of Windows the common practice was to open a copy of the "Notepad" or "Wordpad" editor, and paste into that. Often these operations are available from the "Edit" pull down menu and they may be available via a context menu, usually accessible by context-clicking in the window or dialog entry that is to be cut from or pasted into.
The standard Windows keybindings are:
- Ctrl-c to copy data onto the clipboard
- Ctrl-x to cut data to the clipboard
- Ctrl-v to paste data from the clipboard
Many MS Windows applications also provide Mac OS compatible keybindings.
[edit] Clipboard Managers
Most popular clipboard managers
[edit] Mac OS X
In the Macintosh Operating System the contents can be viewed by selecting the Show Clipboard menu item from the Finder's Edit menu. The standard Mac OS keybindings are:
- Command-c to copy data into the clipboard
- Command-x to cut into it
- Command-v to paste data from the clipboard.
Also available as a secondary, text-only clipboard, is an emacs-style kill-ring. This works in all applications that use standard Cocoa text boxes:
[edit] X Window
In the X Window System (the graphical user interface commonly used on Unix and Linux systems), the clipboard is conventionally used by highlighting text in a window, and using the middle mouse button to paste it into the target. However, there is great diversity among X applications, toolkits and libraries. For example, the GNOME and KDE environments provide closer analogs to the MS Windows clipboard semantics, and applications like Mozilla also provide their own.