demo placeholder text
keypress event and '~' key debug mode toggle
explanation of design in comments
added explicit definition of _ref
reverted loop change (negligible)