form的keypreview设置为True
procedure tform1.formkeydown(sender:tobject;var key:word;shift:Tshiftstate);
begin //ctrl+alt+q
if (ssCtrl in Shift) and (ssAlt in Shift) and (key=ORD('Q')) then
button1.onclick(nil);
end;
form的keypreview设置为True
procedure tform1.formkeydown(sender:tobject;var key:word;shift:Tshiftstate);
begin //ctrl+alt+q
if (ssCtrl in Shift) and (ssAlt in Shift) and (key=ORD('Q')) then
button1.onclick(nil);
end;