public static interface View.OnKeyListener
boolean onKey(View v, int keyCode, KeyEvent event)
Key presses in software keyboards will generally NOT trigger this method, although some may elect to do so in some situations. Do not assume a software input method has to be key-based; even if it is, it may use key presses in a different way than you expect, so there is no way to reliably catch soft input key presses.
v
- The view the key has been dispatched to.keyCode
- The code for the physical key that was pressedevent
- The KeyEvent object containing full information about
the event.