title: Hide or disable WebView softkeyboard Go/Done/Enter button
body: <p>I've been searching for a working example of this all day and haven't found anything that actually works.</p>
  
  <p>I have a simple feedback form online which I've setup with WebView to work on android devices, specifically for Nexus 7 (it will only be used locally at our hotel on these devices). </p>
  
  <p>The thing is that the html feedback form has different fieldsets, some with radio buttons others with text fields and text areas. The form is sent via post and I have a jquery validation script called in the form:</p>
  
  <pre><code>&lt;form name="form" method="post" action="feedback_manager/fb_save.php" onsubmit="return validateForm()" &gt;
  </code></pre>
  
  <p>Everything works just fine, except for when a user fills in a text field there's an unmistakable blue "Go" button in the soft keyboard which they are bound to click (or touch) once they've finished typing, the problem is that it doesn't take them to the next form fieldset, instead it submits the form automatically (or in this case runs my validation script first).</p>
  
  <p>Isn't the KEYCODE_ENTER button's default action supposed to send the user to the next fieldset instead of submitting the form?</p>
  
  <p>I'll share my html form and my webView script in hopes that someone may find what I'm doing wrong:</p>
  
  <pre><code>&lt;fieldset&gt;
  &lt;legend&gt;Food quality, taste &amp;amp; presentation&lt;/legend&gt;
  
      &lt;input id="flavor4" name="flavor" value="excellent" type="radio" /&gt;
      &lt;label for="flavor4"&gt; Excellent&lt;/label&gt;&lt;br&gt;
  
      &lt;input id="flavor3" name="flavor" value="good" type="radio" /&gt;
      &lt;label for="flavor3"&gt; Good&lt;/label&gt;&lt;br&gt;
  
      &lt;input id="flavor2" name="flavor" value="average" type="radio" /&gt;
      &lt;label for="flavor2"&gt; Average&lt;/label&gt;&lt;br&gt;
  
      &lt;input id="flavor1" name="flavor" value="bad" type="radio" /&gt;
      &lt;label for="flavor1"&gt; Needs improvement&lt;/label&gt;&lt;br&gt;
  
  &lt;/fieldset&gt;
  &lt;fieldset&gt;
      &lt;legend&gt;Who was your waiter today?&lt;/legend&gt;
      &lt;input name="waiter" type="text"&gt;
  &lt;/fieldset&gt;
  
  //then another fieldset with radio buttons and so on
  </code></pre>
  
  <p>Could it be that my text inputs aren't immediately right after one another and mixed in with radio buttons and combo boxes?</p>
  
  <p>Here's my onKeyDown code:</p>
  
  <pre><code>@Override
  public boolean onKeyDown(int keyCode, KeyEvent event)
  {
      if ((event.getKeyCode() == KeyEvent.KEYCODE_BACK) &amp;&amp; mWebView.canGoBack())
      {
          mWebView.goBack();
          return true;
      }
      if (keyCode == KeyEvent.KEYCODE_ENTER &amp;&amp; event.getAction() == KeyEvent.ACTION_DOWN) {
          // do nothing
          return false;
      }
      return true;
  }
  </code></pre>
  
  <p>The funny thing about this is that my KEYCODE_BACK conditional is working fine but I would like the KEYCODE_ENTER button to either do nothing and just close the soft keyboard or go to the next field but not submit the form.</p>
  
  <p>I've seen a lot of answers here on SO but none of them seem to be working on Nexus7 (haven't really tried on other devices).</p>
  
  <p>So summing up, all I need is just have that blue "Go" button do nothing or go to the next field.</p>
  
  <p>Help please.</p>
  
  <p>** <strong>Edit</strong> **</p>
  
  <p>I'm looking at this with a fresh outlook this morning and found this similar post that adds an OnKeyListener to detect the key and then returns false. <a href="https://stackoverflow.com/questions/4513888/enter-key-on-edittext-hitting-onkey-twice">Enter key on EditText hitting onKey twice</a> </p>
  
  <pre><code>mWebView = (WebView) findViewById(R.id.webview);
      mWebView.getSettings().setJavaScriptEnabled(true);
      mWebView.loadUrl("http://some.url");
      mWebView.setWebViewClient(new virtuoWebViewClient());
  
      mWebView.setOnKeyListener(new View.OnKeyListener() {
          public boolean onKey(View v, int keyCode, KeyEvent event) {
              if (event.getAction() == KeyEvent.ACTION_DOWN) {
                  if (keyCode == KeyEvent.KEYCODE_ENTER) {
                      // do nothing
                      return false;
                  }
              }
              return false;
          }
      });
  </code></pre>
  
  <p>But still nothing, the "Go" button still submits the form :(, I'll keep trying, if anybody could point me in a different direction or share new ideas, I'll greatly appreciate it. Thx.</p>