Nostalgic of old Pascal?
Press ESC to stop
while(true) { yield new Snippet.ReadKey({trapallkeys:true}); display.innerText = KeyCodeNames[this.result] || this.result; if (this.result === 27) break; }