I have a code:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
switch (keyData)
{
case Keys.Alt|Ke
According to your code, all the break(s) and the last statement are never reached, for there are the return statements before.
You could rewrite your code like this:
switch (keyData)
{
case Keys.Alt|Keys.D1:
if (this._condition1) return true;
else goto default;
case Keys.Control |Keys.U:
if (this._condition2) return true;
else goto default;
default:
return base.ProcessCmdKey(ref msg, keyData);
}