Multiple key presses in one case
<p>So I'm making an application that will use a lot of keys on the keyboard, and I want to put them all in a switch-case. My problem is, the application also needs to detect key combinations like Shift + 9 for brackets, etc. I tried this:</p>

<pre><code>case Keys.Shift &amp; Keys.D9:
</code></pre>

<p>But I found out that the '&amp;' operator is unary or binary, and no other operators seem to work.</p>

<p>Can I solve this by making a nested switch-case like:</p>

<pre><code>case Keys.Shift:
    switch (e.KeyCode)
    {
         case Keys.D9:

         break;
    }
    break;
</code></pre>

<p>Or is this bad practise? Because I don't really want to make a big list of if-else statements.</p>

<p>Thanks in advance.</p>