It is not possible to get a touch event for a soft keyboard.
If you want to capture keys as they are entered into an EditText
, check out the EditText.addTextChangedListener()
function.
Alternatively, try implementing the View.OnKeyListener
interface in your Activity
, or overriding public boolean dispatchKeyEvent(KeyEvent e)
, or overriding public boolean onKeyDown(int keyCode, KeyEvent event)
. In all of those cases, you can check what the keyCode
or KeyEvent
is and handle it as you wish.