title: Universal Key Code (Java)
body: <p>Hi I'm programming a listener that based on the key pressed by the user, must act in a certain manner.</p>
  
  <p>I need to be able to determine if a user press the <kbd>I</kbd> key or <kbd>M</kbd> key. Actually I'm doing it like:</p>
  
  <pre><code>// If pressed the 'i' key
  if ( evt.getKeyCode() == 73) {
      //
  }
  ...
  </code></pre>
  
  <p><a href="http://java.sun.com/docs/books/tutorial/uiswing/events/keylistener.html" rel="nofollow noreferrer">I look out here</a> and with the sample applet determine that the <kbd>I</kbd> key is recognized as a 73 code. </p>
  
  <p>That works.</p>
  
  <p>But I'm working at Mac OS X, and I don't know if once I try to run this app on another OS or just JVM, It won't work.</p>
  
  <p>Is the 73 a universal key code? Is there a certain way to program this so it can run and determine the key pressed, on windows.</p>
  
  <p>Thank you!</p>