With a key binding
Example:
{ "key": "ctrl+alt+7", "command": "type", "args": { "text": "Hello World" }, "when": "editorTextFocus" }