Called when a key is pressed while the element is selected or the mouse is over it.
1 string key
the key that was pressed.