I've got code in a view that launches the virtual keyboard as follows:

InputMethodManager imm = (InputMethodManager) context.getSystemService
(Context.INPUT_METHOD_SERVICE);
boolean shownKeyboard = imm.showSoftInput(this, 0);

I'm picking up key presses from it fine except for the enter key,
which never gets detected.

Solutions that *don't* work include:

onKeyUp/onKeyDown/onKeyMultiple/dispatchKeyEvent in the view/activity
dispatchKeyEventPreIme/onKeyPreIme in the view

These methods don't get called when the enter key is pressed on the
virtual keyboard.

How can I trap and react to the enter key?

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

Reply via email to