title: Are Up, Down, Left, Right Arrow KeyCodes always the same?
body: <p>As the title suggests, in my code I use the following codes:</p>
  
  <ul>
  <li><strong>Left:</strong> 37</li>
  <li><strong>Up:</strong> 38</li>
  <li><strong>Right:</strong> 39</li>
  <li><strong>Down:</strong> 40</li>
  </ul>
  
  <p>And check for those key codes to determine my action. My question is, do those always remain the same? If I were to use a DVORAK keyboard, or a non-English keyboard, would those key codes remain the same?</p>
  
  <p>Along the same line, is there a preferred method for detecting those keystrokes?</p>
  
  <p>Currently, I do it as follows:</p>
  
  <pre><code>    var Key = {
          _pressed: {},
          LEFT: 37,
          UP: 38,
          RIGHT: 39,
          DOWN: 40,
  
          isDown: function (keyCode) {
              return this._pressed[keyCode];
          },
  
          onKeydown: function (event) {
              this._pressed[event.keyCode] = true;
  
              if (Key.isDown(Key.UP))
                  //do up action
              else if (Key.isDown(Key.DOWN)) {
                  //do down action
              }
              delete this._pressed[event.keyCode];
          }
      };
  </code></pre>