procedure TForm1.StringGrid1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  case Key of
    VK_RETURN:
      if TStringGrid(Sender).Col + 1 < TStringGrid(Sender).ColCount then
        TStringGrid(Sender).Col := TStringGrid(Sender).Col + 1
      else begin
        TStringGrid(Sender).Col := TStringGrid(Sender).FixedCols;
        if TStringGrid(Sender).Row + 1 < TStringGrid(Sender).RowCount then
          TStringGrid(Sender).Row := TStringGrid(Sender).Row + 1
        else TStringGrid(Sender).Row := TStringGrid(Sender).FixedRows;
      end;
  end;
end;