How do WWDC presenters paste text during demos?

Solution 1:

Apple used custom code called "Demo Monkey" whose source code is available on GitHub.

Solution 2:

You can create custom Xcode snippets. Snippets can include from one method to whole program.

Check this article on NSHipster, for me is one of the best explanations of this that I found.