Q:

Retrieve the name of the key in a pgfkeys .code macro

Just to focus the problem, I am thinking of reducing the numbers of parameters of the circuitikz package into a reasonable ballpark; now for example each one of the 30+ generators have a different key for setting the width, which I find it's not reasonable; the same happens to transistors etc etc. 
I want to warn the user about the change, so I am thinking to change 
\tikzset{/one/two/four/.initial=0.5}

into 
\def\deprecationwarning{\PackageWarning{circuitikz}{%
Please look at the manual: the key /one/two/four is deprecated}}

\tikzset{/one/two/four/.code=\deprecationwarning}

(which will be easy done, with a search and replace of .initial=.*} on a region).
The question is: it is possible to retrieve the name of the key in the macro \deprecationwarning? So that I can just substitute the .initial=blah} with a fixed string? 
Extra points if a subsequent \pgfkeysvalueof use of the key can throw an error...
This is the MWE for playing with the idea...
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tikz}

\def\deprecationwarning{\PackageWarning{circuitikz}{%
Please look at the manual: the key /one/two/four is deprecated}}

\tikzset{/one/two/three/.initial=0.5}
% \ctikzset{one/two/four/.initial=0.5}
\tikzset{/one/two/four/.code=\deprecationwarning}

\begin{document}
\tikzset{/one/two/three=3}
\tikzset{/one/two/four=4}
\Huge
*\pgfkeysvalueof{/one/two/three}*\quad *\pgfkeysvalueof{/one/two/four}*
\end{document}

A:

Sorry for the confusion, I think you are looking for \pgfkeyscurrentpath.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tikz}

\def\deprecationwarning{\PackageWarning{circuitikz}{%
Please look at the manual: the key \pgfkeyscurrentpath\space is deprecated}}

\tikzset{/one/two/three/.initial=0.5}
% \ctikzset{one/two/four/.initial=0.5}
\tikzset{/one/two/four/.code=\deprecationwarning}

\begin{document}
\tikzset{/one/two/three=3}
\tikzset{/one/two/four=4}
\Huge
*\pgfkeysvalueof{/one/two/three}*\quad *\pgfkeysvalueof{/one/two/four}*
\end{document}

