title: From Qt::Key to native keyboard code
body: <p>Is there a way to convert back from <code>Qt::Key</code> to the native keyboard code (either scan code or virtual key code)?</p>
  
  <p><code>QKeyEvent</code> has two methods:</p>
  
  <pre><code>nativeScanCode () const
  quint32 nativeVirtualKey () const
  </code></pre>
  
  <p>So somewhere there needs to be a mapping between the native code and the <code>Qt:Key</code> . I am looking for the inverse function <code>Qt:Key</code> -> native code</p>
  
  <p>According to " <a href="https://stackoverflow.com/questions/7482213/how-to-convert-a-windows-native-virtual-key-code-to-qtkey">How to convert a Windows native virtual key code to Qt::Key?</a> " I would expect the mapping in <code>qt\src\gui\kernel\qkeymapper_win.cpp</code> but this file does not exist in my src path <strong>(Qt 5.2)</strong>.</p>
  
  <p>-- Edit (Samoth's answer) --</p>
  
  <p>I am able to locate the files now, silly mistake on my side. What I am really looking for is a way to</p>
  
  <ol>
  <li>either convert <code>Qt:Key</code> to native / virtual code</li>
  <li>or vice versa </li>
  </ol>
  
  <p>Unfortunately I did not find this method so far.</p>