How to use GetAsyncKeyState without calling it multiple times?
<p>This is how my code currently looks like:</p>

<pre><code>    if (GetAsyncKeyState(VK_CONTROL) &amp;&amp; GetAsyncKeyState(0x31)) {
        //...
    }

    if (GetAsyncKeyState(VK_CONTROL) &amp;&amp; GetAsyncKeyState(0x32)) {
        //...
    }

    if (GetAsyncKeyState(VK_CONTROL) &amp;&amp; GetAsyncKeyState(0x33)) {
        //...
    }

    if (GetAsyncKeyState(VK_CONTROL) &amp;&amp; GetAsyncKeyState(0x34)) {
        //...
    }

    if (GetAsyncKeyState(VK_CONTROL) &amp;&amp; GetAsyncKeyState(0x35)) {
        //...
    }
</code></pre>

<p>Is there some more efficient way of doing this without calling GetAsyncKeyState multiple times per loop? Maybe store the function value into an integer and then use a switch statement?</p>

<p>Also, I do not want to use RegisterHotKey.</p>
