Befuddling behavior with Visual Studio Code

Most applications populate the clipboard with multiple formats.

Visual Studio Code creates:

  • a public.html NSPasteBoardItem (preserving the foreground and background colour, particular fonts, etc)
  • a public.utf8-plain-text NSPasteBoardItem
  • a org.chromium.web-custom-data NSPasteBoardItem (which Keyboard Maestro has no use for, and ignores)

BBEdit's clipboard is unusually bare, it just creates:

  • a public.utf8-plain-text NSPasteBoardItem (so no rich text access to colours etc)

In Keyboard Maestro, you are seeing a rich text clipboard and a plain text clipboard.

Many applications populate the clipboard with more than 3 different NSPasteBoardItems.

In the case of text copied from Bike, for example, the pasting application can choose between:

  • com.hogbaysoftware.bike.xml
  • org.opml.opml
  • public.rtf
  • public.utf16-external-plain-text
  • public.utf8-plain-text
  • public.html
  • public.data
  • com.hogbaysoftware.bike.references

Keyboard Maestro offers:

  1. rich text clipboards (typically drawn from any public.html or public.rtf NSPasteBoardItems that it finds in the clipboard), and
  2. plain text clipboards (typically drawn from any available public.utf8-plain-text pasteboard item)

In the Clipboard History, you will generally be able to distinguish them by their icons.

See also, for example:

1 Like