title: Enabling and disabling keyboard input using jquery
body: <p>I have a form where I want to disable keyboard input. However I still want to postback the form as part of collection so adding the 'disabled' attribute isnt the solution for me. </p>
  
  <p>I have added this code to make the input readonly:</p>
  
  <pre><code> //code to not allow any changes to be made to input field
          $(".customreadonly").keydown(function () {
              return false;
          });
  </code></pre>
  
  <p>And then I set this class like this:</p>
  
  <pre><code>  $("#StartRRP").addClass('customreadonly');
  </code></pre>
  
  <p>However when I remove the class like this:</p>
  
  <pre><code>$("#StartRRP").removeClass('customreadonly');
  </code></pre>
  
  <p>The input still wont allow keyboard input. This seems to be trivial, what am I doing wrong ?</p>
  
  <p>Thanks in advance...</p>