title: Get keycode regardless of keyboard layout
body: <p>I have a program in which I need to get the keycode in javascript of a pressed key no matter what keyboard language settings a user has.</p>
  
  <p>This is my code:</p>
  
  <p>JS:</p>
  
  <pre><code>window.addEventListener('keydown', function(e) {
      console.log(e.keyCode);
      // it works fine in all browsers, but in qwebview keycode == 0 in russian layout
  });
  </code></pre>
  
  <p>Python:</p>
  
  <pre><code>class View(QWebView):
  
      def __init__(self, parent=None):
          super(QWebView, self).__init__(parent)
  
      def keyPressEvent(self, e):
          print e.key() # same as in JS
          print e.nativeScanCode() # ??
          # QWebView.keyPressEvent(self, e)
  </code></pre>