# Using key value in enumerate to another key value

This is a follow-up question to Enumitem \SetEnumitemKey and conflict between multiple key before and after.

I want to use a key value in a list in the definition of another. Here I use a better definition of \Pointilles which allows a second parameter, i.e. the vertical space between the dots.

So I put this code instead of the old one:

\usepackage{xargs}
\newcommand{\auxpts}[1]{\makebox[\linewidth]{\dotfill} #1}
% Pointilles
\newcommandx{\Pointilles}[2][1=1,2=\bigbreak]{%
\vspace*{-\medskipamount}
\multido{\i=1+1}{#1}{%
\auxpts{#2}
}
}


and replace each occurrence of \Pointilles{#1} by \Pointilles[#1], and \Pointilles{2} by \Pointilles[2].

This gives the final code:

\documentclass[twocolumn]{article}
\usepackage[a4paper, top=0.5cm, bottom=1.6cm, left=0.7cm , right=0.7cm]{geometry}
\parindent0cm
\usepackage{multido}
\usepackage{enumitem}
\usepackage{multicol}
\usepackage{xargs}

\newcommand{\auxpts}[1]{\makebox[\linewidth]{\dotfill} #1}
% Pointilles
\newcommandx{\Pointilles}[2][1=1,2=\bigbreak]{%
\vspace*{-\medskipamount}
\multido{\i=1+1}{#1}{%
\auxpts{#2}
}
}

label=\arabic*.,
before=\maybemulticols\maybedots,
after=\maybefinaldots\maybeendmulticols
}

\let\maybemulticols=\relax
\let\maybeendmulticols=\relax
\let\maybedots=\relax
\let\maybefinaldots=\relax
\def\doitemdots#1{%
\let\olditem\item% save the standard definition of \item in a macro, \olditem
\firstItemtrue% set the toggle for first item in the list to true
\def\item{%
\iffirstItem
\olditem\firstItemfalse
\else
\newline\Pointilles[#1][\bigbreak]\mbox{}\olditem %TODO here need to replace \bigbreak by the value of a parameter
\fi
}% new, temporary defition of \item
}
\def\dofinaldots#1{%
\ \newline \Pointilles[#1][\bigbreak]\mbox{} %TODO here need to replace \bigbreak by the value of a parameter
}

\makeatletter
\define@key{m45}{cols}{%
\def\maybemulticols{\begin{multicols}{#1}}%
\def\maybeendmulticols{\end{multicols}}%
}
\newif\iffirstItem\firstItemfalse

\define@key{m45}{dots}{%
\def\maybedots{\doitemdots{#1}}
\def\maybefinaldots{\dofinaldots{#1}}
}
\makeatother
%==========================================
\begin{document}

\Pointilles[2]
\hrule
\item first
\item second
\item third
\item fourth
\hrule
\item first
\item second
\item third
\item fourth
\hrule
\item first
\item second
\item third
\item fourth
\hrule
\item first
\item second
\item third
\item fourth
\hrule
\end{document}


So the question is: how can I do to pass a new key value in the list instead of the default \bigbreak (the two matching lines have a %TODO)?