title: How to override Soft keyboard keyPress event in android?
body: <p>I need a listener's to detect user interaction on my activity which has a fragment attached to it, for which i have overriden <code>diapatchTouchEvent()</code> which is working fine for touch event and hard key events, but it does not work for soft keyboard keypress.</p>
  
  <p>To intercept keyboard touch events i have tried <code>onUserInteraction()</code>, <code>dispatchKeyEvents()</code>, <code>onKeyUp</code>, <code>onKeyDown</code> but none of them is working for softkeyboard.</p>
  
  <p>Is there any other way to intercept softkeyboard events in Android?</p>
  
  <p>for above query i have gone through these links :</p>
  
  <p><a href="https://stackoverflow.com/a/25620981/3954050">https://stackoverflow.com/a/25620981/3954050</a> </p>
  
  <p><a href="https://stackoverflow.com/questions/14217535/android-softkeyboard-onkeydown-up-not-detecting-alternative-keys">Android SoftKeyboard onKeyDown/Up not detecting &#39;alternative&#39; keys</a></p>