All Topics  
Clipboard (software)

 

   Email Print
   Bookmark   Link






 

Clipboard (software)



 
 
The clipboard is a software facility that can be used for short-term data storage and/or data transfer between documents or applications, via copy and paste operations. It is most commonly a part of a GUI
Graphical user interface

A graphical user interface is a type of user interface which allows people to human-computer interaction such as computers; hand-held devices such as MP3 Players, Portable Media Players or Gaming devices; household appliances and office equipment....
 environment and is usually implemented as an anonymous, temporary block of memory that can be accessed from most or all programs within the environment via defined programming interface
Application programming interface

An application programming interface is a set of subroutine, data structures, class and/or Protocol provided by library and/or operating system Service s in order to support the building of applications....
s. A typical application accesses clipboard functionality by mapping user input (keybindings, menu selections, etc.) to these interfaces.

Basic functions
The semantics
Semantics

Semantics is the study of meaning in communication. The word is derived from the Greek language word s??a?t???? , "significant", from s??a??? , "to signify, to indicate" and that from s??a , "sign, mark, token"....
 of the clipboard facility varies from one operating environment to another, and can also vary between versions of the same system.






Discussion
Ask a question about 'Clipboard (software)'
Start a new discussion about 'Clipboard (software)'
Answer questions from other users
Full Discussion Forum



Encyclopedia


The clipboard is a software facility that can be used for short-term data storage and/or data transfer between documents or applications, via copy and paste operations. It is most commonly a part of a GUI
Graphical user interface

A graphical user interface is a type of user interface which allows people to human-computer interaction such as computers; hand-held devices such as MP3 Players, Portable Media Players or Gaming devices; household appliances and office equipment....
 environment and is usually implemented as an anonymous, temporary block of memory that can be accessed from most or all programs within the environment via defined programming interface
Application programming interface

An application programming interface is a set of subroutine, data structures, class and/or Protocol provided by library and/or operating system Service s in order to support the building of applications....
s. A typical application accesses clipboard functionality by mapping user input (keybindings, menu selections, etc.) to these interfaces.

Basic functions


The semantics
Semantics

Semantics is the study of meaning in communication. The word is derived from the Greek language word s??a?t???? , "significant", from s??a??? , "to signify, to indicate" and that from s??a , "sign, mark, token"....
 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
Muscle memory

Muscle memory is a common term for neuromuscular facilitation, which is the process of the neuromuscular system memorizing motor skills....
.

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.

Data formats


Early implementations of the clipboard stored data as plain text without meta-information such as typeface, type style or color. More recent implementations support the multiple types of data, allowing complex data structures to be stored. These range from styled text formats such as RTF
Rich Text Format

The Rich Text Format is a document file format file format developed by Microsoft in 1987 for cross-platform document interchange. Most word processors are able to read and write RTF documents....
 or HTML
HTML

HTML, an Acronym and initialism of HyperText Markup Language, is the predominant markup language for Web pages. It provides a means to describe the structure of text-based information in a document?by denoting certain text as links, headings, paragraphs, lists, and so on?and to supplement that text with interactive forms, embedded '...
, 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
Spreadsheet

A spreadsheet is a computer application that simulates a paper worksheet. It displays multiple cells that together make up a grid consisting of rows and columns, each cell containing either alphanumeric text or numeric values....
 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.

When data is added to the clipboard by an application, it typically makes it available in as many different data formats as it can. This includes both native and simpler (or more common) formats that would have a higher chance of being recognized by a wide variety of applications. Thus, when data is pasted into another application, the format that is closest to that application's native format can be used, preserving as much of the original data as possible. In Windows in particular, the internal clipboard functionality of the operating system will automatically translate data from known advanced formats to simpler formats automatically (such as RTF to plain text, or Unicode
Unicode

Unicode is a computing industry standard allowing computers to consistently represent and manipulate Character expressed in most of the world's writing systems....
 to ANSI Text), increasing the likelihood that any given application can interpret some form of the original data.

Clipboard management

Modern GUIs often provide a clipboard manager
Clipboard manager

A clipboard manager is a computer program that adds additional functionality to basic Clipboard usage. The main tasks of aclipboard manager are:...
 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 transactions. 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.

Operating system-specific clipboards


Microsoft Windows

In some versions of the Microsoft Windows
Microsoft Windows

Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces ....
 operating system, the contents of the clipboard can be viewed at any time by using the Clipboard Viewer (Clipbook Viewer in Windows XP and 2000) application (clipbrd.exe). It helps if you run search for this program by clicking start* then search* and type in clipbrd.exe. It should be found in windows/system32. 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


alternative keybindings (available in most windows programs)

  • Ctrl-Insert is copy
  • Shift-Delete is cut
  • Shift-Insert is paste


the advantage of the alternative keys is that the fingers can stay close to the arrow and selection keys when you are editing a large body of text

The Clipbook Viewer was removed entirely in Windows Vista
Windows Vista

Windows Vista is one member in a family of operating systems developed by Microsoft for use on personal computers, including home and business Desktop computer, laptops, Tablet PCs, and media center PCs....
.

Mac OS X


In the Macintosh Operating System
Mac OS

Mac OS is the trademarked name for a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems....
 the contents can be viewed by selecting the Show Clipboard menu item from the Finder
Finder

Finder may refer to:* Finder , a core component of the Apple Macintosh operating system, is the graphical representation of the computer's file system...
's Edit menu. The standard Mac OS keybindings are:

  • Command
    Command key

    The Command key, also historically known as the Apple key or open-Apple key, is a modifier key present on Apple Keyboards. An "extended" Macintosh keyboard?the most common type?has two command keys, one on each side of the space bar; some compact keyboards have one only on the left....
    -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
Emacs

Emacs is a class of feature-rich text editors, usually characterized by their extensibility. Emacs has, perhaps, more editing commands than any other editor or word processor, numbering over 1,000....
-style kill-ring. This works in all applications that use standard Cocoa
Cocoa (API)

Cocoa is one of Apple Inc.'s native object-oriented application program environment for the Mac OS X operating system. It is one of four major Application programming interfaces available for Mac OS X; the others are Carbon , POSIX , and Java platform....
 text boxes
Text box

A text box, text field or text entry box is a common element of graphical user interface of computer programs, as well as the corresponding type of widget used when programming GUIs....
:

  • Ctrl-k to kill from cursor to end-of-line.
  • Ctrl-y to yank from kill-ring to cursor.


X Window System


The X Window System
X Window System

The X Window System is a computing software system and network protocol that provides a graphical user interface for networked computers. It implements the X Window System protocols and architecture and provides windowing system on raster graphics Visual display units and manages Keyboard and pointing device control functions....
 commonly used on Unix
Unix

Unix is a computer operating system originally developed in 1969 by a group of American Telephone & Telegraph employees at Bell Labs, including Ken Thompson , Dennis Ritchie, Douglas McIlroy, and Joe Ossanna....
 and Linux
Linux

Linux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed by anyone under the terms of the GNU GPL license...
 systems provides a clipboard implementation via selections
X Window selection

Selections, cut buffers, and drag-and-drop are the mechanisms used in the X Window System to allow a User to transfer data from a window to another....
. Selections are asynchronous, so data is copied and converted into the desired format only on-demand.

The usage and handling of various selections is not standardized. However most modern toolkits and desktop environments, such as GNOME
Gnome

A gnome is a mythical creature characterized by its extremely small size and wiktionary:subterranean lifestyle. The word gnome is derived from the New Latin gnomus....
 or KDE
KDE

KDE is a free software project based around its flagship product, a desktop environment for Unix-like systems. The goal of the project is to provide basic desktop functions and applications for daily needs as well as tools and documentation for developers to write stand-alone applications for the system....
, follow a widely accepted convention, outlined in the freedesktop.org
Freedesktop.org

freedesktop.org is a project to work on interoperability and shared base technology for free software desktop environments for the X Window System on Linux and other Unix-like operating systems....
 specification. One selection, CLIPBOARD, is used for traditional clipboard semantics, with shortcuts similar to Windows. Another selection, PRIMARY, is an X11-specific mechanism. Data is "copied" immediately upon highlighting and pasted with the third (middle) mouse button. This is usually separate from the CLIPBOARD selection and does not change its contents.

External links



Information for developers