TextExpander, Butler, TypeIt4Me, Typinator, Keyboard Maestro, pasteboard history applications, and other applications briefly commandeer Mac OS X’s general pasteboard to transport large chunks of data into the user’s current context quickly. Often, shortly after this data is inserted, the pasteboard is returned to its previous contents. These applications need a way to identify their data as being temporary, different than content Copied by the user, and/or otherwise special – additional pasteboard types offer a solution.
CopyPaste Pro, iClip, and other pasteboard history utilities maintain histories of the pasteboard’s contents. Pasteboard data identified as transient should not be included in these histories.
Additionally, password utilities such as 1Password might mark passwords or other sensitive data, either placed programmatically or user-Copied to the pasteboard, so that pasteboard history utilities could obfuscate passwords when displayed on screen (to avoid inadvertently revealing your password to a “shoulder surfer”), and/or avoid writing them as plain text to a pasteboard history file.
Pasteboard history utilities may also choose to treat content identified as not explicitly Copied by the user differently, either by excluding it, or by presenting it differently
Identify and respect currently-defined transient and not-user-Copied pasteboard data identifiers.
Define new, shared transient, not-user-Copied, and confidential pasteboard data identifiers to use and respect in the future.
Known ‘proprietary’ pasteboard marker types identifying the pasteboard content as “transient”:
@"de.petermaurer.TransientPasteboardType"
@"com.typeit4me.clipping"
@"Pasteboard generator type"
Known ‘proprietary’ pasteboard marker types identifying the pasteboard content as confidential:
@"com.agilebits.onepassword"
Please send other existing identifiers to: register@nspasteboard.org, and we’ll add them to this list.
To avoid a proliferation of marker types from a variety of developers, use these universal identifiers:
org.nspasteboard.TransientType
: This marker’s presence indicates content will be on the pasteboard only momentarily. The pasteboard will either be restored to previous content, or the current content will be replaced within seconds. Data marked transient should not be recorded or displayed in a pasteboard history.org.nspasteboard.ConcealedType
: This marker’s presence indicates content that should be treated as confidential. If displayed on screen it should be visually obfuscated. Avoid recording it to a file, or consider encrypting it.org.nspasteboard.AutoGeneratedType
: This marker’s presence indicates content was generated by an application; the user had no intention to Copy this content and may not expect to find it on the pasteboard. (This marker is often found with a TransientType marker as well.) Data marked this way probably should not be recorded as part of the pasteboard history, but (if not also marked transient) might need to be displayed as the “current” pasteboard content.org.nspasteboard.source
: This marker’s presence indicates that the source of the content is the application with the bundle identifier matching its UTF–8 string content. For example: [pasteboard setString: @"org.nspasteboard.SampleApp" forType: @"org.nspasteboard.source"];
This is useful when the source is not the foreground application. This is meant to be shown to the user by a supporting app for informational purposes only. Note that an empty string is a valid value as explained below.org.nspasteboard.TransientType
type with a payload of your choice to a pasteboard that will be replaced or restored shortly after it is placed on the pasteboard. For example: [generalPasteboard setData: [NSData data] forType: @"org.nspasteboard.TransientType"];
org.nspasteboard.ConcealedType
data identifierorg.nspasteboard.AutoGeneratedType
data identifierorg.nspasteboard.source
to the original source application. Applications that scan the [[NSPasteboard generalPasteboard] changeCount]
frequently would likely assume the pasteboard history application is the source of “unmarked” pasteboard content if it is focussed while placing this content on the pasteboard. In case the original source of the content is not known, set org.nspasteboard.source
to the empty string (@""
).org.nspasteboard.source
.If you are writing a new application in this area, please don’t create new identifiers for generated or transient data, password or sensitive data, or indicators of the data’s source application. If you feel some other type of marker is needed for your software’s needs, join the discussion as mentioned below and propose it there.
If your software shows a history of the pasteboard contents, displays the current pasteboard contents, or otherwise manipulates or responds to changes in the general pasteboard:
de.petermaurer.TransientPasteboardType
, com.typeit4me.clipping
, Pasteboard generator type
, and com.agilebits.onepassword
)org.nspasteboard.TransientType
, org.nspasteboard.ConcealedType
, org.nspasteboard.AutoGeneratedType
, and org.nspasteboard.source
)These pasteboard marker types and proposals for others are discussed on a Google Group discussion list. To request an invitation to the group, send an email to textexpander@smilesoftware.com with subject: NSPasteboard.org.
These applications support all or some of the universal and/or proprietary identifiers described above. (List is in alphabetical order by application name.)
Application | URL | Notes |
---|---|---|
1Password | https://1password.com | |
Butler | https://manytricks.com/butler | 1 |
CopyPaste Pro | https://plumamazing.com/product/copypaste-pro-for-mac/ | |
iClip | http://iclipapp.com/ | |
iClipboard | https://apps.apple.com/us/app/iclipboard/id495039294?mt=12 | 2 |
Keyboard Maestro | https://www.keyboardmaestro.com/ | |
Paste | https://pasteapp.io/ | |
PopChar | https://www.ergonis.com/products/popcharx/ | 3 |
TextExpander | https://textexpander.com/ | |
TypeIt4Me | https://typeit4me.com/ | |
Typinator | https://www.ergonis.com/products/typinator/ | 3 |
Yoink! | https://eternalstorms.at/yoink/mac/ |
If your application is not listed or your application is listed and you’d like to add notes, please submit details per “Discussion” above.
org.nspasteboard.source
; removed PTH Pasteboard, as it is no longer available.org.nspasteboard.source
could be usedHosted by Smile