I am trying to capture the "back" key event when the soft keyboard is shown.
I am using SDK ver 8 and can successfully capture the back key event ONLY when the soft keyboard is HIDDEN as follows:
@Override
public void onBackPressed() {
// do something
super.onBackPressed();
}
The problem is that the system is not calling this method while the soft keyboard is shown. I have tried to log onKeyDown/Up() methods as well as the above method to work out what is happening in this scenario to no avail. See below:
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
//DEBUGGING
Log.d(TAG + "KeyUP", String.valueOf(event));
}
Logs are returned for volume and menu keys as expected but the back key is only logged when the soft keyboard and menu are hidden.
Are there any "back key" guru's out there that can explain this phenomenon?
Any help is greatly appreciated.