title: MapVirtualKey returns wrong chars in MAPVK_VK_TO_CHAR mode
body: <p>I trying to use <code>MapVirtualKey[A]/[W]/[ExA]/[ExW]</code> API to map <code>VK_*</code> code to character by means of its <code>MAPVK_VK_TO_CHAR (2)</code> mode.</p>
  <p>I have found that it always returns <code>'A'..'Z'</code> chars for <code>'VK_A'..'VK_Z'</code> no matter which keyboard layout I have active.</p>
  <p><a href="https://docs.microsoft.com/windows/win32/api/winuser/nf-winuser-mapvirtualkeyw" rel="nofollow noreferrer">The docs</a> are saying that:</p>
  <blockquote>
  <p>The uCode parameter is a virtual-key code and is translated into an
  unshifted character value in the low order word of the return value.
  Dead keys (diacritics) are indicated by setting the top bit of the
  return value. If there is no translation, the function returns 0.</p>
  </blockquote>
  <p>But I cannot get <code>unshifted character value</code> nor non-ASCII character from it.</p>
  <p>For other buttons it works as described. And this behavior is even more annoying considering that, for example for US English keyboard layout it returns:</p>
  <pre><code>VK_Q (0x51) -&gt; `Q` (U+0051 Latin Capital Letter Q)
  VK_OEM_PERIOD (0xbe) -&gt; `.` (U+002E Full Stop)
  </code></pre>
  <p>But for Russian keyboard layout it returns:</p>
  <pre><code>VK_Q (0x51) -&gt; `Q` (U+0051 Latin Capital Letter Q)
                  ^- here it should return `й` (U+0439 Cyrillic Small Letter Short I) according to docs
  VK_OEM_PERIOD (0xbe) -&gt; `ю` (U+044E Cyrillic Small Letter Yu)
  </code></pre>
  <p>How to use it properly?</p>