我试了下,行的
unit Unit1;
interface
uses
SysUtils, Types, Classes, Variants, QTypes, QGraphics, QControls, QForms,
QDialogs, QStdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
procedure Edit1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses
Qt;
{$R *.xfm}
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = Key_Return then ShowMessage('主键盘回车按下');
if Key = Key_Enter then ShowMessage('数字键盘回车按下');
{if Key = 4100 then ShowMessage('主键盘回车按下');
if Key = 4101 then ShowMessage('数字键盘回车按下');}
end;
end.