java - Android onKey w/ virtual keyboard -


i catching keyboard events/presses using onkey method:

public boolean onkey(view arg0, int arg1, keyevent arg2) {     //do     return false; } 

this fires off fine physical keyboard presses not fire on virtual keyboard presses. there event handler handle virtual keyboard presses?

if it's edittext, see if can use textchangedlistener instead.

myedittext.addtextchangedlistener(new textwatcher(){         public void aftertextchanged(editable s) {}         public void beforetextchanged(charsequence s, int start, int count, int after) {}         public void ontextchanged(charsequence s, int start, int before, int count) {             //do stuff         }      }); 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -