procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
l_KEY : string;
begin
{ VK_0 thru VK_9 are the same as ASCII '0' thru '9' ($30 - $39) }
{ VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' ($41 - $5A) }
case key of
0..9: l_KEY := IntToStr(key);
65: l_KEY := 'A';
66: l_KEY := 'B';
67: l_KEY := 'C';
68: l_KEY := 'D';
69: l_KEY := 'E';
70: l_KEY := 'F';
71: l_KEY := 'G';
72: l_KEY := 'H';
73: l_KEY := 'I';
74: l_KEY := 'J';
75: l_KEY := 'K';
76: l_KEY := 'L';
77: l_KEY := 'M';
78: l_KEY := 'N';
79: l_KEY := 'O';
80: l_KEY := 'P';
81: l_KEY := 'Q';
82: l_KEY := 'R';
83: l_KEY := 'S';
84: l_KEY := 'T';
85: l_KEY := 'U';
86: l_KEY := 'V';
87: l_KEY := 'W';
88: l_KEY := 'X';
89: l_KEY := 'Y';
90: l_KEY := 'Z';
end;
if ssCtrl in Shift then
Edit1.Text := '^ +' + L_key;
end;
//方法答了点,不过能实现你说的功能