Code example for KeyEvent

Methods: getDeviceIdgetMetaStategetUnicodeChar

0
          //case KeyEvent.KEYCODE_MENU: return 0x01000012; // Fake MENU 
 
          case KeyEvent.KEYCODE_DEL: return 8;
       } 
 
       int result = event.getUnicodeChar( event.getMetaState() );
       if (result==android.view.KeyCharacterMap.COMBINING_ACCENT)
       { 
          // TODO: 
          return 0; 
       } 
       return result;
    } 
 
    @Override 
    public boolean onKeyDown(final int inKeyCode, KeyEvent event) {
         // Log.e("VIEW","onKeyDown " + inKeyCode); 
          Log.v("VIEW", "device of event is " + event.getDeviceId());
          Log.v("VIEW","onKeyDown " + inKeyCode);
         final MainView me = this;
         final int keyCode = translateKey(inKeyCode,event);
         final int deviceId = event.getDeviceId();
         if (keyCode!=0) {
             queueEvent(new Runnable() {
                 // This method will be called on the rendering thread: 
                 public void run() { 
                     me.HandleResult(NME.onKeyChange(keyCode,true));