title: Non latin characters replace on .keyup() does not work when typing fast
body: <p>I have jQuery code that replace Cyrillic user input with Latin chars. This work fine when user input is not too fast (60-70 chars per minute) but when user typing faster then this, it mixed Cyrillic chars and Latin chars, probably because cannot catch <code>keyup</code> event in time. How can I fix this?</p>
  
  <pre><code>$("input[name*=Name]").not("input[name*=Main]").keyup(function (e) {
              if (e.keyCode === 8 || e.keyCode === 46 || e.keyCode === 9 || e.keyCode === 13 || e.keyCode === 17 || e.keyCode === 18 || e.keyCode === 37 || e.keyCode === 38 || e.keyCode === 39 || e.keyCode === 40 || e.keyCode === 16 || e.keyCode === 20) {
                  return false;
              } else {
                  var englishchars = ["a", "b", "v", "g", "d", "e", "yo", "zh", "z", "i", "yi", "k", "l", "m", "n", "o", "p", "r", "s", "t", "u", "f", "kh", "c", "ch", "sh", "shch", "i", "e", "yu", "ya", ""];
                  var slavicchars = ["а", "б", "в", "г", "д", "е", "ё", "ж", "з", "и", "й", "к", "л", "м", "н", "о", "п", "р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ы", "э", "ю", "я", "ь"];
                  var verified = String.fromCharCode(e.wich).match(/[^а-яё]/);
                  if (verified) {
                      e.preventDefault();
                      var lastchar = this.value.length &gt; 1 ? this.value.substr(-1) : this.value;
                      var russiancharindex = jQuery.inArray(lastchar, slavicchars);
                      if (russiancharindex &gt; 0) {
                          var englishcharindex = englishchars[russiancharindex];
                          this.value = this.value.replace(lastchar, englishcharindex);
                      } else {
                          return false;
                      }
                  } else {
                      return false;
                  }
              }
          });
  </code></pre>