title: Key press event of html is not working in mobile devices
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function keyDown()
  {
  alert("KeydownEvent Fired");
  }
  function keypress()
  {
  alert("keypress Event Fired")
  }
  function keyup()
  {
  alert("key up event fired");
  }
  function onlyAlphabets(e) {
                  debugger;
                  try {
                      if (window.event) {
                          var charCode = window.event.keyCode;
                      }
                      else if (e) {
                          var charCode = e.which;
                      }
                      else { return true; }
                      var keyCodes = [13, 16, 18, 19, 20, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 91, 92, 93, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 96, 97, 98, 99,
                                      100, 101, 102, 103, 104, 105, 144, 145];
                      if (keyCodes.indexOf(charCode) != -1) {
                          return false;
                      }
                      else if ((charCode &gt; 64 &amp;&amp; charCode &lt; 91) || (charCode &gt; 96 &amp;&amp; charCode &lt; 123) || charCode == 8 || charCode == 32 || charCode == 9 || charCode == 46 || charCode == 37 || charCode == 39 || charCode == 16 || charCode == 17)
                          return true;
                      else
                          return false;
                  }
                  catch (err) {
                      alert(err.Description);
                  }
              }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="textbox" placeholder="Keydown" onkeydown="return onlyAlphabets(event,this);"&gt;&lt;/input&gt;
  &lt;/br&gt;
  &lt;input type="textbox" placeholder="Keypress" onkeypress="keypress()"&gt;&lt;/input&gt;
  &lt;/br&gt;
  &lt;input type="textbox" placeholder="Keyup" onkeyup="keyup()"&gt;&lt;/input&gt;
  &lt;/br&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is just a piece of code.</p>
  
  <p>I have include a some input tags which all have Different keypress events  and then I have uploaded it to live, it working fine in all the browser's,
  but when I try to open my page in Mobile or tablet it is not working fine.</p>
  
  <p>Even if alerts are working in Browsers but i have kept a validation for first name on keydown that user can only enter alphabets(numeric and special character not allowed)</p>