procedure TForm1.ApplicationProperties1UserInput(Sender: TObject; Msg: Cardinal);
var
Info: string = 'unknown';
begin
case msg of
//
LM_NULL : Info := 'LM_NULL';
LM_CREATE : Info := 'LM_CREATE';
LM_DESTROY : Info := 'LM_DESTROY';
LM_MOVE : Info := 'LM_MOVE';
// keys
LM_KEYDOWN : Info := 'LM_KEYDOWN';
LM_KEYUP : Info := 'LM_KEYUP';
LM_CHAR : Info := 'LM_CHAR';
LM_SYSKEYDOWN : Info := 'LM_SYSKEYDOWN';
LM_SYSKEYUP : Info := 'LM_SYSKEYUP';
LM_SYSCHAR : Info := 'LM_SYSCHAR';
//
LM_COMMAND : Info := 'LM_COMMAND';
LM_SYSCOMMAND : Info := 'LM_SYSCOMMAND';
LM_TIMER : Info := 'LM_TIMER';
LM_HSCROLL : Info := 'LM_HSCROLL';
LM_VSCROLL : Info := 'LM_VSCROLL';
LM_CTLCOLORMSGBOX : Info := 'LM_CTLCOLORMSGBOX';
LM_CTLCOLOREDIT : Info := 'LM_CTLCOLOREDIT';
LM_CTLCOLORLISTBOX : Info := 'LM_CTLCOLORLISTBOX';
LM_CTLCOLORBTN : Info := 'LM_CTLCOLORBTN';
LM_CTLCOLORDLG : Info := 'LM_CTLCOLORDLG';
LM_CTLCOLORSCROLLBAR : Info := 'LM_CTLCOLORSCROLLBAR';
LM_CTLCOLORSTATIC : Info := 'LM_CTLCOLORSTATIC';
// mouse
LM_MOUSEMOVE : Info := 'LM_MOUSEMOVE';
LM_LBUTTONDOWN : Info := 'LM_LBUTTONDOWN';
LM_LBUTTONUP : Info := 'LM_LBUTTONUP';
LM_LBUTTONDBLCLK : Info := 'LM_LBUTTONDBLCLK';
LM_RBUTTONDOWN : Info := 'LM_RBUTTONDOWN';
LM_RBUTTONUP : Info := 'LM_RBUTTONUP';
LM_RBUTTONDBLCLK : Info := 'LM_RBUTTONDBLCLK';
LM_MBUTTONDOWN : Info := 'LM_MBUTTONDOWN';
LM_MBUTTONUP : Info := 'LM_MBUTTONUP';
LM_MBUTTONDBLCLK : Info := 'LM_MBUTTONDBLCLK';
LM_MOUSEWHEEL : Info := 'LM_MOUSEWHEEL';
LM_XBUTTONDOWN : Info := 'LM_XBUTTONDOWN';
LM_XBUTTONUP : Info := 'LM_XBUTTONUP';
LM_XBUTTONDBLCLK : Info := 'LM_XBUTTONDBLCLK';
LM_MOUSEHWHEEL : Info := 'LM_MOUSEHWHEEL';
LM_PARENTNOTIFY : Info := 'LM_PARENTNOTIFY';
LM_CAPTURECHANGED : Info := 'LM_CAPTURECHANGED';
LM_DROPFILES : Info := 'LM_DROPFILES';
LM_SELCHANGE : Info := 'LM_SELCHANGE';
LM_DPICHANGED : Info := 'LM_DPICHANGED';
LM_CUT : Info := 'LM_CUT';
LM_COPY : Info := 'LM_COPY';
LM_PASTE : Info := 'LM_PASTE';
LM_CLEAR : Info := 'LM_CLEAR';
// control notifications
CN_KEYDOWN : Info := 'CN_KEYDOWN';
CN_KEYUP : Info := 'CN_KEYUP';
CN_CHAR : Info := 'CN_CHAR';
CN_SYSKEYUP : Info := 'CN_SYSKEYUP';
CN_SYSKEYDOWN : Info := 'CN_SYSKEYDOWN';
CN_SYSCHAR : Info := 'CN_SYSCHAR';
CN_NOTIFY : Info := 'CN_NOTIFY';
end;
if msg <> LM_MOUSEMOVE then
begin
Memo1.Append(Format('Control = %s, message = %s (%d) ', [Sender.ClassName, info, msg]));
{$ifdef LCLGTK2}
Memo1.SelStart:=Length(Memo1.Lines.Text)-1;
Memo1.SelLength:=0;
{$endif}
end;
end;