User Tools

Site Tools


Clipboards

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Clipboards [2018/07/25 19:32]
JMichaelTX [System Clipboard] Add section on Pause Until
Clipboards [2024/09/28 22:42] (current)
peternlewis
Line 1: Line 1:
-{{:​clipboards-sm-icon.png?​nolink|}} 
 ====== Clipboards ====== ====== Clipboards ======
  
 **Keyboard Maestro supports several different types of clipboards** **Keyboard Maestro supports several different types of clipboards**
-  * **System Clipboard** — the standard [[https://​en.wikipedia.org/​wiki/​Clipboard_%28computing%29|Mac OS X Clipboard]] used by all Mac apps +  * [[#System Clipboard]] — the standard [[https://​en.wikipedia.org/​wiki/​Clipboard_%28computing%29|Mac OS X Clipboard]] used by all Mac apps 
-      * The alternate name "**[[token:​CurrentClipboard|Current Clipboard]]**" is used in some Macro Actions +      * The alternate name "​[[token:​CurrentClipboard|Current Clipboard]]"​ is used in some Macro Actions 
-  * **Named Clipboards** — Copy of System Clipboard, or other Named Clipboard, created by user for future use+  * [[#Named Clipboards]] — Copy of System Clipboard, or other Named Clipboard, created by user for future use
       * There is usually a default *Named Clipboard* named "​Default Clipboard",​ do not confuse this with the Mac’s *System Clipboard*.       * There is usually a default *Named Clipboard* named "​Default Clipboard",​ do not confuse this with the Mac’s *System Clipboard*.
   * **Past Clipboards** — Prior Versions of the *System Clipboard* stored in the Keyboard Maestro [[#​Clipboard_History]]   * **Past Clipboards** — Prior Versions of the *System Clipboard* stored in the Keyboard Maestro [[#​Clipboard_History]]
-  * **Trigger Clipboard** — The clipboard referenced by a [[trigger:​Clipboard Filter]] menu selection (or the System Clipboard otherwise).+  * [[#Trigger Clipboard]] — The clipboard referenced by a [[trigger:​Clipboard Filter]] menu selection (or the System Clipboard otherwise).
  
 ===== System Clipboard ===== ===== System Clipboard =====
  
 The System Clipboard is the clipboard that you will use and work with the most. The System Clipboard is the clipboard that you will use and work with the most.
 +
 +==== Actions That Use The Clipboard ====
 +
  
 (!) Keep in mind that **the System Clipboard is involved in all operations (Actions)** that transfer data between the user interface (documents, menus, web pages,etc) and Keyboard Maestro. (!) Keep in mind that **the System Clipboard is involved in all operations (Actions)** that transfer data between the user interface (documents, menus, web pages,etc) and Keyboard Maestro.
Line 22: Line 24:
   * and many others   * and many others
  
-**Pause Until Clipboard Changes**+==== Pause Until Clipboard Changes ​==== 
  
 Sometimes you will need to wait until the app has completed setting the Clipboard. ​ You can use the [[function:​CLIPBOARDSEED|]],​ in a calculation (`CBSeedBefore ≠ CLIPBOARDSEED()`) condition in the [[action:​Pause_Until|Pause Until Action]] to achieve this.  Of course you will need to set the Keyboard Maestro Variable `CBSeedBefore` in an Action _before_ the Action to set the Clipboard. Sometimes you will need to wait until the app has completed setting the Clipboard. ​ You can use the [[function:​CLIPBOARDSEED|]],​ in a calculation (`CBSeedBefore ≠ CLIPBOARDSEED()`) condition in the [[action:​Pause_Until|Pause Until Action]] to achieve this.  Of course you will need to set the Keyboard Maestro Variable `CBSeedBefore` in an Action _before_ the Action to set the Clipboard.
 +
 +==== Discussion ====
 +
  
 The System Clipboard is a complicated entity, and often contains many different flavors of the same data last copied from an app.  To better understand how Keyboard Maestro processes the System Clipboard, see [[https://​forum.keyboardmaestro.com/​t/​ulysses-no-text-in-clipboard/​6742/​23?​u=jmichaeltx | this Forum post by @PeterNLewis]]. ​ In particular, this post deals with getting plain text from the System Clipboard. The System Clipboard is a complicated entity, and often contains many different flavors of the same data last copied from an app.  To better understand how Keyboard Maestro processes the System Clipboard, see [[https://​forum.keyboardmaestro.com/​t/​ulysses-no-text-in-clipboard/​6742/​23?​u=jmichaeltx | this Forum post by @PeterNLewis]]. ​ In particular, this post deals with getting plain text from the System Clipboard.
Line 44: Line 50:
 To trigger the Clipboard History Switcher, press the default hotkey of <​key>​⌘</​key><​key>​⌃</​key><​key>​⇧</​key><​key>​V</​key>​ (or a hot key of your choosing). To trigger the Clipboard History Switcher, press the default hotkey of <​key>​⌘</​key><​key>​⌃</​key><​key>​⇧</​key><​key>​V</​key>​ (or a hot key of your choosing).
  
-{{ manual:​clipboardhistoryswitcher.png?​672 |Clipboard History Switcher Window }}+{{ manual:​clipboardhistoryswitcher.png?​nolink&​674 ​| Clipboard History Switcher Window }}
  
 You can also use the [[collection:​Clipboard_History]] within the [For Each action](/​action/​For_Each). You can also use the [[collection:​Clipboard_History]] within the [For Each action](/​action/​For_Each).
Line 76: Line 82:
       * To restore at end of your Macro.       * To restore at end of your Macro.
       * To use in other Macros.       * To use in other Macros.
- 
  
 (!) Note that Keyboard Maestro provides a named clipboard with the name of "​Default Clipboard"​. ​ It is nothing special, and acts like any other named clipboard. ​ The "​Default"​ in the name means nothing more than that it was provided by default. ​ Do not mistake this for the System Clipboard. (!) Note that Keyboard Maestro provides a named clipboard with the name of "​Default Clipboard"​. ​ It is nothing special, and acts like any other named clipboard. ​ The "​Default"​ in the name means nothing more than that it was provided by default. ​ Do not mistake this for the System Clipboard.
  
 +Named Clipboards are located in the Keyboard Maestro Preferences in their own “Clipboards” panel.
 +
 +{{:​keyboard_maestro_named_clipboard_prefs.png?​direct&​400|}}
 +
 +Use the [+] button to create a new named clipboard.
 +
 +The one-line field at the top-right is the name field.
 +
 +The big field on the lower-right is the content field.
  
 +You can add plain text, styled text, and images simply by pasting into the content field, but if you want to add something like a Keyboard Maestro action you need to use a Copy to Named Clipboard action to get it in there.
 ===== Trigger Clipboard ===== ===== Trigger Clipboard =====
  
-The Trigger Clipboard is not a clipboard per se, but a reference to a clipboard, either ​the System Clipboard, a past clipboard in the Clipboard Historyor Named Clipboard.  It is the clipboard referenced by a [[trigger:​Clipboard Filter]] ​menu selection ​in the Clipboard Switcher.+The Trigger Clipboard is not a clipboard per se, instead it is a reference to a selected ​clipboard. Usually it will be the selected ​clipboard in the Clipboard History ​Switcher ​or Named Clipboard ​Switcher window that you wish to act on with a [[trigger:​Clipboard Filter]]. It will be either a past clipboard ​in the Clipboard ​History ​Switcher, or a Named Clipboard in the Named Clipboard Switcher, or if none of them are selected it will refer to the System Clipboard.
  
 +For example, if you are viewing the Clipboard History Switcher, and select the third last clipboard entry and then choose a Clipboard Filter from the Gear menu, the Trigger Clipboard will refer to the selected clipboard.
 ===== Clipboard Actions ===== ===== Clipboard Actions =====
  
Line 122: Line 138:
   * [[token:​NamedClipboard|%NamedClipboard%]]   * [[token:​NamedClipboard|%NamedClipboard%]]
   * [[token:​PastClipboard|%PastClipboard%]]   * [[token:​PastClipboard|%PastClipboard%]]
 +
 +===== Clipboard Condition =====
 +
 +The [[condition:​Clipboard|Clipboard Condition]] may be used with [[Actions|Macro Actions]] like [[action:​If_Then_Else|IF/​THEN]] to branch control based on criteria concerning the data on the Clipboard. ​ For details see: [[condition:​Clipboard|Clipboard Condition]]
 +
  
 ===== See Also ===== ===== See Also =====
Clipboards.1532561549.txt.gz · Last modified: 2018/07/25 19:32 by JMichaelTX