Starting with version 1.0 of expkv-cs (released on 2021-06-20) this is trivial, though the built in possibilities with expkv-cs are quite limited compared to other key=value implementations (like, e.g., expkv with expkv-def or l3keys or pgfkeys), since expkv-cs almost exclusively works with argument forwarding and can't store arbitrary data in any macro.
However for most simple use cases it is really straight forward to create key=value taking macros. And with the ... primary key specification introduced in v1.0 forwarding unknown keys is as complicated as using #1:
\documentclass[]{article}
\usepackage{expkv-cs}
\newcommand\somecommand{\ekvoptarg\somecommandOUT{}}
\newcommand\somecommandOUT[2]
{arg 1: \texttt{\detokenize{#1}}, arg 2: #2\par\medskip}
\newcommand\fooflag{} % make sure the name isn't yet taken
\ekvcFlagNew\fooflag % define it as a flag
\newcommand*\othercommand
{%
% set the flag to be false
\ekvcFlagSetFalse\fooflag
\ekvoptarg\othercommandKEYS{}%
}
\ekvcSplitAndForward\othercommandKEYS\othercommandOUT
{%
bar = -1 % will be #1 in \othercommandOUT
,... % will be #2 in \othercommandOUT
}
\ekvcSecondaryKeys\othercommandKEYS
{%
% Set up keys to handle foo. It'll not use argument forwarding but instead
% flags. Those are computationally expensive though, an argument forwarding
% mechanism with a bit of manual parsing might be better here
flag-bool foo = \fooflag
,flag-true foo = \fooflag
,default bar = 0
}
\newcommand\othercommandOUT[2]
{%
\ekvcFlagIf\fooflag{foo is enabled\par}{}%
bar is set to #1\par
\somecommand[{#2}]% mandatory argument curried
}
\begin{document}
\othercommand[foo, bar=9]{baz}
\othercommand{baz}
\othercommand[foo, bar, zip=12]{baz}
\end{document}
You'll notice that this example also didn't use LaTeX2e's standard mechanism for optional arguments but instead used \ekvoptarg. This has the advantage of being fully expandable (downside: the optional argument must be followed by a mandatory argument; and a mandatory argument {[} can't be distinguished from the beginning of the optional argument).
Another variant which doesn't use flags for foo:
\documentclass[]{article}
\usepackage{expkv-cs}
\makeatletter
\newcommand\somecommand{\ekvoptarg\somecommandOUT{}}
\newcommand\somecommandOUT[2]
{arg 1: \texttt{\detokenize{#1}}, arg 2: #2\par\medskip}
\newcommand\othercommand{\ekvoptarg\othercommandKEYS{}}
\ekvcSplitAndForward\othercommandKEYS\othercommandOUT
{%
bar = -1 % will be #1 in \othercommandOUT
,... % will be #2 in \othercommandOUT
,foo-internal=@secondoftwo % will be #3
}
\ekvcSecondaryKeys\othercommandKEYS
{%
nmeta foo = foo-internal=@firstoftwo
,meta foo = foo-internal=@firstoftwo
,default bar = 0
}
\newcommand\othercommandOUT[3]
{%
#3{foo is enabled\par}{}%
bar is set to #1\par
\somecommand[{#2}]% mandatory argument curried
}
\makeatother
\begin{document}
\othercommand[foo, bar=9]{baz}
\othercommand{baz}
\othercommand[foo, bar, zip=12]{baz}
\end{document}
Output of both:

\somecommandalso acceptfooandbaras options? – Werner Jan 31 '19 at 20:19\KV@errxthat you could redefine to handle unknown keys, but imho it would be better to use a newer keyval package like l3keys from expl3 which has built-in handlers for this case. – Ulrike Fischer Jan 31 '19 at 20:41\somecommandonly acceptszapas optional argument, but neitherfoonorbar. So these should not be passed to the\somecommand. – T. Pluess Feb 02 '19 at 17:38