Issue was caused by VK_F4 having the same exact code as a lowercase &#39;s&#39;.<br> So the code, which treated WM_CHAR and WM_KEYDOWN as the same, executed<br> the wrong piece of code which was meant to be ONLY for WM_KEYDOWN.<br>

<br>Patch is attached.<br>