clipboard.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Mon, 22 Feb 2016 12:41:52 +0200
changeset 1903 901e7394849f
parent 1894 2e3bc2435d68
child 1905 fba288d59662
permissions -rw-r--r--
Decrease intent to increase space usage on mobile.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1894
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 139
diff changeset
     1
.. -*- coding: utf-8; -*-
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 139
diff changeset
     2
.. include:: HEADER.rst
139
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
1894
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 139
diff changeset
     4
=====================
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 139
diff changeset
     5
 Clipboard/selection
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 139
diff changeset
     6
=====================
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 139
diff changeset
     7
.. contents::
139
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
1894
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 139
diff changeset
     9
MS Windows
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 139
diff changeset
    10
==========
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 139
diff changeset
    11
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 139
diff changeset
    12
X Windows
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 139
diff changeset
    13
=========
139
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    14
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    15
X11 selection transfers (which both PRIMARY and CLIPBOARD are instances of)
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    16
are done through synthesized X11 events and properties changes.
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    17
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    18
The messages used to transfer the selections have a maximum size that's
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    19
actually quite low (a few kilobytes).
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    20
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    21
See
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    22
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    23
  http://standards.freedesktop.org/clipboards-spec/clipboards-latest.txt
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    24
  http://www.jwz.org/doc/x-cut-and-paste.html
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    25
  http://en.wikipedia.org/wiki/X_Window_selection
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    26
  http://www.emacswiki.org/cgi-bin/wiki/CopyAndPaste
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    27
1894
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 139
diff changeset
    28
xclipboard
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 139
diff changeset
    29
==========
139
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    30
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    31
The xclipboard command emulates the traditional Macintosh style clipboard by
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    32
claiming ownership of the CLIPBOARD selection and answering any requests for
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    33
its value. When it loses the selection, it immediately asks the new owner for
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    34
the value of the CLIPBOARD selection, makes a local copy, and then reasserts
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    35
ownership of the CLIPBOARD. This way the clipboard contents can persist after
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    36
the original application has exited.
35727a17a437 About x selection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    37