Change Formatting Of Clipboard Content

I'm trying to change the format of my clipboard content and paste it afterwards. I basically want the text to be pasted using the destination font and size + to be bold, but it seems I'm not able to do it. I've enabled
"Don't apply template's font", but the font it is still being applied

Here's the trigger:

[
  {
    "BTTLastUpdatedAt" : 1762955876.0271211,
    "BTTTriggerType" : 0,
    "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
    "BTTUUID" : "28F4E48C-6FBA-462F-9E36-CF2D5FEB91C0",
    "BTTAdditionalConfiguration" : "0",
    "BTTShortcutKeyboardType" : 2302,
    "BTTTriggerOnDown" : 1,
    "BTTNotesInsteadOfDescription" : 1,
    "BTTLayoutIndependentChar" : "v",
    "BTTShortcutKeyCode" : 9,
    "BTTShortcutAdvancedModifierKeys" : "0",
    "BTTShortcutModifierKeys" : 1966080,
    "BTTOrder" : 13,
    "BTTAutoAdaptToKeyboardLayout" : 0,
    "BTTActionsToExecute" : [
      {
        "BTTLastUpdatedAt" : 1762960059.8574271,
        "BTTTriggerParentUUID" : "28F4E48C-6FBA-462F-9E36-CF2D5FEB91C0",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
        "BTTUUID" : "E427EADB-8FFA-4062-9169-F2B58E3EC1EF",
        "BTTPredefinedActionType" : 495,
        "BTTPredefinedActionName" : "Change Formatting Of Clipboard Content",
        "BTTAdditionalActionData" : {
          "BTTActionChangeTextFormattingIgnoreFont" : 1,
          "BTTActionChangeTextFormattingChangeFontColor" : 0,
          "BTTActionChangeTextFormattingIgnoreAlignment" : 0,
          "BTTActionChangeTextFormattingIgnoreFontSize" : 0,
          "BTTActionChangeTextFormattingFontColor" : null,
          "BTTActionChangeTextFormattingFontSizeFix" : 0,
          "BTTActionChangeTextFormattingChangeFontSize" : 0,
          "BTTActionChangeTextFormattingUseTemplateString" : 1,
          "BTTActionChangeTextFormattingTemplateString" : "{\\rtf1\\ansi\\ansicpg1252\\cocoartf2822\n\\cocoatextscaling0\\cocoaplatform0{\\fonttbl\\f0\\fswiss\\fcharset0 Helvetica-Bold;}\n{\\colortbl;\\red255\\green255\\blue255;\\red0\\green0\\blue0;}\n{\\*\\expandedcolortbl;;\\csgray\\c0;}\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\pardirnatural\\partightenfactor0\n\n\\f0\\b\\fs24 \\cf2 text}",
          "BTTActionChangeTextFormattingSetFontSize" : 0
        },
        "BTTShortcutKeyboardType" : 0,
        "BTTShortcutKeyCode" : -1,
        "BTTOrder" : 2,
        "BTTAutoAdaptToKeyboardLayout" : 0
      },
      {
        "BTTLastUpdatedAt" : 1762955849.9475641,
        "BTTTriggerParentUUID" : "28F4E48C-6FBA-462F-9E36-CF2D5FEB91C0",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
        "BTTUUID" : "695323A8-3F0E-44C5-80E8-30F8BFC01666",
        "BTTLayoutIndependentActionChar" : "v",
        "BTTShortcutToSend" : "55,9",
        "BTTShortcutKeyboardType" : 0,
        "BTTShortcutKeyCode" : -1,
        "BTTOrder" : 4,
        "BTTAutoAdaptToKeyboardLayout" : 0
      }
    ],
    "BTTGestureNotes" : "Make clipboard content bold and paste it"
  }
]

Additionally in Outlook a new line is being inserted after I use this trigger. For other apps, like TextMate, Script Editor - no new line.

I think I can see the problem. Will hopefully be resolved in the next alpha!

Andreas, I've installed BTT: 5.756, but I do not see change of the behavior.

I had a stupid typo in the code (my R key seems to be breaking :sob:). Could you try again with 5.757? (uploading now)

1 Like

Andreas, can you guide me how to create what I want, because I think either I'm missing something or not understanding or something is still not working.

I would like a copied text to be pasted in bold keeping the destination font and size.

your trigger seems to do that for me - only the "don't apply font-size" checkbox needs to be enabled additionally

which version of macOS are you currently running?

macOS: 15.5 (24F74)

Just making sure, this is how it behaves for me on macOS 26.1 (once the "don't apply font-size" checkbox is enabled). This is the behavior you want or is there something wrong?

I'll check on my macOS 15 machine tomorrow.

//edit for some reason Safari currently doesn't seem to play the discourse forum videos - it works fine in Chrome

Here's my example:

  • 1st paste was regular copy/paste - everything works as expected - format and size are kept.
  • 2nd paste (with some random item from CM) was using the trigger - font is the one configured in BTT and not the destination one - Aptos, size is 9 (configured in BTT), instead of 10.
  • Last paste - I'm copying from Outlook itself and pasting again with the trigger - result is the same - destination size and font are not respected.

Ah maybe a misunderstanding - there is no possibility for BTT to know the destination font / format, it can only keep the copied source font/format.

In case of the outlook / BTT copy, it seems the copied text is plain text, in that case there is no format it can keep.

Hm, in that case why in the last example, when I copy a text with font and size, from Outlook, and paste it is not keeping them, but it is using Helvetica?

It is getting even weirder - If I check in CM the public.rtf raw text I see the Helvetica font, despite the fact that it is copied with Arial font for example

1st line - text is typed in Arial
2nd line - copy line 1 and normal paste (it is again triggered from BTT) - all good
3rd line - copy line 1 and trigger paste - font and size are not kept

AFAIK Microsoft apps default to this when writing text to the clipboard that has not specifically formatted (kind of plain text but stored as rtf)

(In general Microsoft apps have a lot of special pasteboard handling, probably due to shared code with the windows versions)