Run when a keyboard key is pressed if the frame is keyboard enabled. Does not run for focused EditBoxes.

Signature:

OnKeyDown(self, "key")

Arguments:

  • self - Reference to the widget for which the script was run (frame)
  • key - Name of the key pressed (string, binding)