Triggering an Action via typed string (Built-in text expansion)


tl;dr - Can the Keyboard Shortcut for Actions be extended to allow for strings of typed text as the trigger? Native text expansions harnessing the Actions scripting environment would be a compelling Pro feature.


In line with Drafts’ mission to be the fastest/easiest way to capture and act on your text, I think that the ability to trigger Actions by typing an abbreviated ‘shortcut’ string would make both text input and text processing even more seamless. As a pro feature this would also help a D5 subscription to become a complete text editing environment that would reduce dependency on other apps/services (namely Editorial and TextExpander), and as an integrated solution it would probably surpass them anyway.

Current situation

At present the easiest way to trigger actions while typing (via the on-screen keyboard) is by including them an ‘extended keyboard’. D5 has widened this power by integrating the full Actions architecture into each ‘key’ of what can now be several different extended keyboards, but the number of actions that can be accessed this way is still limited by screen size and the need to manually switch between (or scroll) layouts.

Drafts has had the ability to assign keyboard shortcuts to Actions for a while, but only for hardware keyboards (and these are for single-key triggers only).

Proposal & Benefits

If an abbreviation could be assigned to an Action so that it was triggered when typed (on either on-screen or hardware keyboards), then a far greater number of Actions could be accessible seamlessly within the act of inputting text. This would have all the usual benefits of existing text expansion apps on iOS/macOS (no context-switching, no cluttering of the UI, mnemonics to aid recall, etc.) with the addition of some extra Drafts-specfic benefits:

  • Allow text expansions to call upon Drafts’ integrated JS scripting environment, enabling powers that go far beyond what is currently possible on iOS with TextExpander’s JavaScript support.
  • Interactive snippets involving e.g. the new Prompt UI for placeholder support, other Action steps/variables à la Editorial’s workflow scripting.
  • For users who currently have lots of actions, abbreviation-triggered Actions to insert/modify text would also free up space on extended keyboards to focus on Actions which operate on selected text or on higher level app objects (since typed abbreviations would not be suitable for these).

Wider scope

There is potential for deepening the integration of this feature in the long run (See Keyboard Maestro’s Typed String triggers and what its users are getting up to as a result). In the future it would also be great if the UI could suggest completions for matching abbreviations in the way that Editorial does (though a modification of the existing code for hardware keyboard shortcuts may be all that is necessary to get this started). You may not want to take Drafts in the direction of a code editor, but with the JavaScript and HTML syntaxes already available (with more on the way) the addition of text expansion could make coding in Drafts more compelling.

I understand you may also not want to go head to head with TextExpander, but this feature may also help sway those who are currently on the fence over taking on another app subscription: For me (and anyone else who writes everything possible in Drafts, doesn’t require team collaboration etc.) it would render a TextExpander subscription unnecessary.

Thanks again - for Drafts, and for giving us the chance to get involved,



Great idea. I, for one, would pay for this. Having the ability to decide keyboard shortcuts would be a plus.


Upvote from me. I’m just on the edge of needing a Textexpander subscription (currently do). I would love to be able to build my own equivalent functionality with scripting. It would be even better to be able to trigger any Drafts action with a character sequence.