whenKeyPressed

Creates a 'when key pressed' hat block.

Parameters

key

The key that triggers the script.

block

The script to run.