

Determine if a key has been pressed and store this in a variable.

If no key has been pressed, the program should continue without waiting.




-- in some movie script
 
-- event handler
on keyDown
  pressedKey = _key.key
  put "A key was pressed:" && pressedKey
end