DoKeyDown method

bool DoKeyDown(
  1. TWMKey Message
)

Implementation

bool DoKeyDown(TWMKey Message)
{
  TCustomForm? Form = ParentForm;
  if(Form != null && Form != this && Form.KeyPreview && Form.DoKeyDown(Message))
    return true;

  if(!ControlStyle.contains(ControlStyles.NoStdEvents))
  {
    TKeyCode Key = TKeyCode(Message.CharCode);
    KeyDown(Key, Message.ShiftState);
    if(Key.Code == 0 || Key.Code == null)
    {
      Message.Result = 0;
      return true;
    }
  }
  return false;
}