title: Implementing alpha-numeric TextBox
body: <p>I am trying to implement a alpha-numeric textbox with this code: </p>
  
  <pre><code>    textBoxNewPassword.addKeyPressHandler(new KeyPressHandler() {
          @Override
          public void onKeyPress(KeyPressEvent event) {
              char keyCode = event.getCharCode();
              TextBox sender = (TextBox) event.getSource();
  
              if (!Character.isLetterOrDigit(keyCode) 
                      || !(keyCode == KeyCodes.KEY_TAB)
                      || !(keyCode == KeyCodes.KEY_BACKSPACE) 
                      || !(keyCode == KeyCodes.KEY_LEFT)
                      || !(keyCode == KeyCodes.KEY_RIGHT)
                  )
                  sender.cancelKey();
          }
      });
  </code></pre>
  
  <p>It works however, Backspace and Tab wont work, which is needed to erase something that user has type and to jump to another form fields. </p>
  
  <p>Any ideas what's missing in this code? </p>