This won’t get you all the way there, but it’s close. You can use two snippets like this, binding each one to a different hotkey:
In Library/Personal/Snippet/taskcreate, I have:
---
tags: template
description: Add created attribute to a task set to todays date
hooks.snippet:
slashCommand: taskcreate
command: taskcreate
matchRegex: "^(\\s*)[\\-\\*]?\\s*(\\[[ xX]\\])?\\s*(.+?)(\\s*)$"
description: "Create a new task"
# key: "Ctrl-q t"
---
$1* [ ] $3 [created: {{today}}]
In Library/Personal/Snippet/taskclear, I have:
---
tags: template
description: Make it so the current task is no longer a task
hooks.snippet:
slashCommand: taskclear
command: taskclear
matchRegex: "^(\\s*)[\\-\\*]?\\s*(\\[[ xX]\\])?\\s*(.+?)(\\s*)$"
description: "Remove markdown task"
# key: "Ctrl-q t"
---
$1* $3
I’m not sure if there’s a way to combine those into one ‘toggle/cycle’ snippet. It’d probably require space script to do, but should be doable. Maybe it’d also be a good feature request for the built-in alt-t shortcut?