Hi,
Have you played around with KeyEvent.getUnicodeChar() already? I don't know if
it gives you a ready-to-go solution but based on documentation it should do
some of the work for you at least.
--
H
On Dec 29, 2011, at 2:34 PM, Felipe Monteiro de Carvalho wrote:
> Hello,
>
> I have an activity with a single View inside it, and I use this view
> for everything I need. For getting basic key up / down events
> everything works very easily and fine with this:
>
> @Override public boolean onKeyDown (int keyCode, KeyEvent event)
> {
> //Log.v("lclproject", "LCLSurface.onKeyDown");
> super.onKeyDown(keyCode, event);
> int eventResult = LCLOnKey(KeyEvent.ACTION_DOWN, keyCode, event,
> (char) 0);
> if ((eventResult & 1) != 0) postInvalidate();
> return true;
> }
>
> @Override public boolean onKeyUp (int keyCode, KeyEvent event)
> { ...
>
> But my issue is that this gives only raw key presses. I would like to
> also get the full combined Unicode character which might require
> multiple key up events to be formed.
>
> Is there any example on that? I searched everywhere but couldn't find
> anything ... I read vaguely that one could use KeyCharacterMap for
> this, but reading the docs of this class I got quite lost at how to
> proceed here.
>
> Note that I am *not* using a TextView and neither do I wish to. I am
> writing my own custom drawn framework which includes text editor
> components inside it, so I don't want to use TextView at all.
>
> thanks,
>
> Felipe Monteiro de Carvalho
>
> --
> 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
--
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