>
> Searching the docs for "keyboard 
> character":http://developer.android.com/reference/android/view/KeyCharacterMap.h...,
> int)

The last day I readed this two times and it is not what I need. But I
have to thank you any way, as you sugested it to me I gave it a second
chance and following some link I finally found a solution by using
some MetaKeyKeyListener's functions.

The solution is not as simple as my hypothetical onCharAvailable, but
is working well, take a look:


public boolean onKeyDown(int keyCode, KeyEvent event){
                long newState= MetaKeyKeyListener.handleKeyDown(metaState, 
keyCode,
event);

                //TODO mas se nao for letra tem que chamar o super....

                if(metaState == newState){ //foi uma tecla comum (nao shift nem 
alt
nem sym)
                        int c=
event.getUnicodeChar(MetaKeyKeyListener.getMetaState(newState));

                        if(c == 0) //liberar coisas como menu e voltar
                                return super.onKeyDown(keyCode, event);
                        else{
                                Log.v(TAG,"Got: "+c);
                                metaState= 
MetaKeyKeyListener.adjustMetaAfterKeypress(metaState);

                                this.setText(""+this.getText()+(char)c);

                                if(ncListener != null)
                                        ncListener.onCharAvailable(c);
                        }
                }else
                        metaState = newState;

                return  true;
        }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to