title: Overryride on keypress
body: <p>im trying to override inputs of an android app with a  webview; its get into my onKeyDown because i get the logs but it doesnt do anything I had tried everything ,</p>
  
  <p>Maybe its because its a webview?, the webview is loaded after the event?</p>
  
  <p>here is my code:</p>
  
  <pre><code>public class MainActivity extends Activity{
  
  
  private WebView mWebView;
  
  @Override
  public void onCreate(Bundle icicle) {
      super.onCreate(icicle);
      setContentView(R.layout.activity_main);
  
      //asociamos
      mWebView = (WebView) findViewById(R.id.webview);
  
      mWebView.getSettings().setJavaScriptEnabled(true);
      mWebView.getSettings().setPluginState(WebSettings.PluginState.ON);
      mWebView.setFocusable(true);
      mWebView.getSettings().setLoadWithOverviewMode(true);
      mWebView.getSettings().setUseWideViewPort(true);
      mWebView.getSettings().setBuiltInZoomControls(true);
      mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
      mWebView.setScrollbarFadingEnabled(false);
  
      //cargo un .html que he situado en la carpeta asset/ del proyecto
      mWebView.loadUrl("localUrl webview");
      mWebView.requestFocusFromTouch();
      mWebView.requestFocus();
  
  
  }
  
  
  public boolean onKeyDown(int keyCode, KeyEvent event) {
      Log.v("keyEntra",String.valueOf(keyCode));
      mWebView.requestFocus();
        int mappedKey = keyCode;
      if (keyCode == KeyEvent.KEYCODE_HOME) {
          mappedKey = KeyEvent.KEYCODE_DPAD_LEFT;
           super.onKeyDown(mappedKey, event);
           return true;
      }
      else if(keyCode == KeyEvent.KEYCODE_BACK){
        mappedKey = KeyEvent.KEYCODE_A;
      Log.v("keyNew",String.valueOf(mappedKey));
       super.onKeyDown(mappedKey, event);
       return true;
      }
      else{
          return super.onKeyDown(keyCode, event);  
      }
  
  }
  </code></pre>
  
  <p>Thanks,</p>