function GetShiftState: TShiftState;
begin
Result := [];
if GetKeyState(VK_SHIFT) < 0 then Include(Result, ssShift);
if GetKeyState(VK_CONTROL) < 0 then Include(Result, ssCtrl);
if GetKeyState(VK_MENU) < 0 then Include(Result, ssAlt);
end;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Application.Terminate;
end;
procedure TForm1.FormKeyPress(Sender: TObject
var Key: Char);
begin
if (Key = #11) and
(GetShiftState = [ssShift, ssCtrl]) then
button1.click;
end;
end.
将Form的KeyPreview属性设置为true;