Hi,
I have a regular EditText that nicely pops up the soft keyboard when
the hardware keyboard is closed. Entering data also works fine and
gets preserved by my app. However, when I try to track individual key
presses using the following code,
EditText myedit;
// Only gets number keys??
myedit.setOnKeyListener(new EditText.OnKeyListener() {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
Log.i("OIC","keycode "+keyCode);
KeyCharacterMap kmap = KeyCharacterMap.load(event.getDeviceId
());
if (kmap.isPrintingKey(keyCode) && event.getAction() ==
KeyEvent.ACTION_DOWN) {
// Blah, blah
}
return false;
}
});
no key presses show up in LogCat *except* for number key presses
(0-9). No letters, punctuation, or anything other than numeric digits
and a few special keys such as Del and Return. Is this a bug or a
feature? In this particular case I am only interested in individual
alphabetic key presses, but the listener fails to report them. What's
wrong?
I'm using the official Android 1.5 on my ADP.
Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---