Add a "pressed" function to support keyboard polling.

Usage:

if pressed 'A' then write 'the A key is pressed.'
if pressed 'control' then write 'the Control key is pressed.'
write 'All pressed keys: ' + pressed.list().join(',')

It handles chording and resets tracked state when focus is lost.