//ecLexLibDlg.pas:
//KeyPreview must be True
procedure TLexerLibraryDlg.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
var i: integer;
begin
  if (key = vk_delete) and (shift = []) then
  if LV.Selected <> nil then
  begin
    i := LV.Selected.Index;
    actDeleteLexer.Execute;
    if i >= LV.Items.Count then
      Dec(i);
    if (i >= 0) and (i <= LV.Items.Count-1) then
      LV.Selected := LV.Items[i];
    key := 0;
  end;//at
end;
