Search code examples
javascriptandroidcordovawebviewphonegap

Disable Navigation Keys \ Change Their Function


For example, I am able to prevent the back key from exiting the app using this function:

function onDeviceReady(){
    document.addEventListener("backbutton", onBackKeyDown, false);
}
function onBackKeyDown(){
    alert('back');
    return false;
}

How can I do the same for the over two navigation keys? I used a plugin to hide the whole navigation bar, but it comes back whenever the keyboard comes up.

Thanks in advance.


Solution

  • How can I do the same for the over two navigation keys?

    You don't, from an app. You have no ability to control the behavior of HOME or RECENTS.