ProjectInspector: Add shortcuts for VK_RETURN, VK_DELETE and VK_INSERT, like package editor has.

git-svn-id: trunk@43638 -
This commit is contained in:
juha 2014-01-03 00:15:05 +00:00
parent 3fb2dd4469
commit 7d8d504dd4

View File

@ -225,11 +225,24 @@ end;
procedure TProjectInspectorForm.ItemsTreeViewKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
var
Handled: Boolean;
begin
if Key = 27 then
begin
Key:=0;
Close;
Handled := True;
try
if Key = VK_ESCAPE then
Close
else if Key = VK_RETURN then
OpenButtonClick(Nil)
else if Key = VK_DELETE then
RemoveBitBtnClick(Nil)
else if Key = VK_INSERT then
AddBitBtnClick(Nil)
else
Handled := False;
finally
if Handled then
Key := VK_UNKNOWN;
end;
end;