I would strongly recommend that you update your app to use the InputConnection API that was introduced in 1.5 along with IMEs. Trying to receive input from a soft keyboard via onKeyDown etc is going through a compatibility path that does not have full parity with what IMEs can do.
I can't say exactly why there is a difference in behavior, but there is a fairly rich text editing API that IMEs sit on top of (via InputConnection), which can not always be translated entirely correctly into raw key events. I would guess that they are generating input data on touch downs, so when you change to a different character on the keyboard it needs to do an edit operation that is not translated into raw key events. This is a reasonable thing for input methods to do... though to be nice, for backwards compatibility, they generally should check the input type and if it is a non-IME-aware application only generate simple text operations. On Tue, Apr 20, 2010 at 3:18 AM, skominac <[email protected]> wrote: > I have a custom View which accepts onKeyDown and onKeyMultiple events. > Works well with Android soft keyboard, but it has issues with HTC soft > keyboard, like the one found with HTC Hero. > > Specifically, problem is when a user selects an "alternate" key from a > small pop-up window following a long-press on a key. With Android soft > keyboard, my View is receiving onKeyDown event only from a selected > alternate key. With HTC soft keyboard, onKeyDown event is received for > both the original key (the one that was long-pressed), and the > alternate key selected from a pop-up menu. I can't figure out a way to > determine if certain key events need to be cancelled or not. (I am > dealing with Android 1.5). > > Did anyone have a similar problem? > > Thanks, > > S. > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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

