How to use shouldOverrideKeyEvent to trigger Javascript function
<p>I'm currently building a simpel app for Android with a webview that loads a page that should be controlled from the app. 
For this, I want to completly override the default keybehaviour, and just call a function with the keycode from the key that is pressed. </p>

<p>For this, I've tried the following</p>

<pre><code>public boolean shouldOverrideKeyEvent(BWWebviewClient view, KeyEvent event){

if ((KeyEvent = KeyEvent.KEYCODE_ENTER)){

webview.loadUrl("javascript:getKeyCode(KeyEvent)");
}

return true;
}
</code></pre>

<p>The problem with this is that KeyEvent in my ifstatement cannot be resolved. </p>

<p>What I want to do is simple catch all keys, disable their default behaviour and call a JS function with the keycode as argument. </p>

<p>Can anyone help?</p>
