private boolean translateKeyDown(int keyCode,KeyEvent event){
  mMetaState=MetaKeyKeyListener.handleKeyDown(mMetaState,keyCode,event);
  int c=event.getUnicodeChar(MetaKeyKeyListener.getMetaState(mMetaState));
  mMetaState=MetaKeyKeyListener.adjustMetaAfterKeypress(mMetaState);
  InputConnection ic=getCurrentInputConnection();
  if (c == 0 || ic == null) {
    return false;
  }
  boolean dead=false;
  if ((c & KeyCharacterMap.COMBINING_ACCENT) != 0) {
    dead=true;
    c=c & KeyCharacterMap.COMBINING_ACCENT_MASK;
  }
  if (mComposing.length() > 0) {
    char accent=mComposing.charAt(mComposing.length() - 1);
    int composed=KeyEvent.getDeadChar(accent,c);
    if (composed != 0) {
      c=composed;
      mComposing.setLength(mComposing.length() - 1);
    }
  }
  onKey(c,null);
  return true;
}

private boolean translateKeyDown ( int keyCode , KeyEvent event ) { mMetaState = MetaKeyKeyListener . handleKeyDown ( mMetaState , keyCode , event ) ; int c = event . getUnicodeChar ( MetaKeyKeyListener . getMetaState ( mMetaState ) ) ; mMetaState = MetaKeyKeyListener . adjustMetaAfterKeypress ( mMetaState ) ; InputConnection ic = getCurrentInputConnection ( ) ; if ( c == 0 || ic == null ) { return false ; } boolean dead = false ; if ( ( c & KeyCharacterMap . COMBINING_ACCENT ) != 0 ) { dead = true ; c = c & KeyCharacterMap . COMBINING_ACCENT_MASK ; } if ( mComposing . length ( ) > 0 ) { char accent = mComposing . charAt ( mComposing . length ( ) - 1 ) ; int composed = KeyEvent . getDeadChar ( accent , c ) ; if ( composed != 0 ) { c = composed ; mComposing . setLength ( mComposing . length ( ) - 1 ) ; } } onKey ( c , null ) ; return true ; }
this translates incoming hard key events in to edit operations on an inputconnection . it is only needed when using the process_hard_keys option .
