Hi,

I am trying to pop up and down virtual Keyboard programmatically for a
custom control. I use a surface view and exercise  virtual keyboard
using Input Method Manager ( as show below)



                   minputMethodManager = (InputMethodManager)
this.getSystemService( Context.INPUT_METHOD_SERVICE);
                IBinder windowToken = etxt.getWindowToken();

                if(isKeyboardOn)
                {

                        
minputMethodManager.toggleSoftInputFromWindow(windowToken, 0,
InputMethodManager.HIDE_NOT_ALWAYS);
                        isKeyboardOn = false;
                }
                else
                {
                        
minputMethodManager.toggleSoftInputFromWindow(windowToken,
InputMethodManager.SHOW_FORCED, 0);
                        isKeyboardOn = true;
                }


With this I am able to successfully able to control displaying/hiding
the virtual keyboard, but not able to receive KeyEvent for "enter" key
( also, Caps lock, alt etc). All other key hit the View's key event
handler ( also key dispatcher in activity). Why  is "enter" key not
generating any keyevent ? I am missing out an setting for Input
Manager ?


thanks,
dhanesh

--~--~---------~--~----~------------~-------~--~----~
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