那我试了下,都可以啊
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (key = vk_SUBTRACT )and (shift = [ssCtrl] ) then
edit1.Text:= 'vk_return';
if (key = vk_add)and(shift = [ssCtrl])then
edit2.Text:= 'vk_ctrl';
end;
end.