Occurs when a user presses any key while the control has focus.
Use the OnKeyDown event handler to specify special processing to occur when a key is pressed. The OnKeyDown handler can respond to all keyboard keys, including function keys and keys combined with the Shift, Alt, and Ctrl keys, and pressed mouse buttons.
The TKeyEvent type points to a method that handles keyboard events.
The Key parameter is the key on the keyboard. For non-alphanumeric keys, use virtual key codes to determine the key pressed. For more information, see Virtual Key codes.
The Shift parameter indicates whether the Shift, Alt, or Ctrl keys are combined with the keystroke.