How to get a Strikethrough extension in PopClip

By email:

Any chance you have a “Strike Through" pop clip option?

This is the most popular requested extension.

Unlike with the Forrmatting extension, which presses ⌘B, ⌘I and ⌘U, there is no standard keyboard shortcut for Strikethrough.

For example here in Pages:

That’s why there’s no pre-made Strikethrough extension that you can just install from the extension directory. It wouldn’t “just work”.

However we can fix this by setting a custom keyboard shortcut for Strikethrough. Go to System Settings → Keyboard → Keyboard Shortcuts… → App Shortcuts.

Here click ‘+’ to create a custom shortcut.

Select All Applications and type “Strikethrough” as the menu title (or whatever the menu title is for Strikethrough in the app & system language you are using, if different). Set any keyboard shortcut, here I’m using ⇧⌃⌘S but you can use whetever you want.

And then we see that now there is a keyboard shortcut for Strikethrough in Pages:

With this, now we can easily create a PopClip extension that presses our shortcut:

#popclip
name: Strikethrough
icon: symbol:strikethrough
requirements: [text, formatting]
key combo: control option command S

(The above block is an extension snippet — select it then click “Install Extension” in PopClip.)

And hey presto:

CleanShot 2024-04-16 at 09.54.04

Technical notes:

  • The extension’s action is a Key Press action. See more about Key Press actions.
  • The extension has a requirements key of [text, formatting] this means that the action will only appear if text is selected and PopClip thinks the target app supports formatting controls. This line is an optional nicety to prevent it appearing in other situations. It could be deleted and the extension would still work.
  • Ths icon is strikethrough from SF Symbols, provided by Apple as part of macOS. It is accessed using the icon string symbol:strikethough. See more about icons in PopClip.
4 Likes

Excellent. Thank you for this, and for introducing me to “extension snippets” :smile:

2 Likes

The shortcut also works in Notes and Numbers. Not in Mail. Not in Textedit.

Indeed, those apps don’t have a Strikethrough option in their menus.

It’d be useful to compile an extended list of apps that support Strikethrough command.

So far we have:

Support Strikethrough Does not support Strikethrough
Notes Mail
Numbers TextEdit
Pages
Spark email

You can also add Spark email app to the “Support Strikethrough” list.

1 Like