title: How can i check Caps Lock state in C# (asp.net), client side
body: <p>How can i check 'Caps Lock' state in C# (asp.net), client side? I can't know what user types because they type id/pw on PKI activeX. So I have to know when they click the PKI call button. 
  (.net framework version 2.0)</p>
  
  <p>When I develop this code ... ▷▶</p>
  
  <h1>in aspx (short code)</h1>
  
  <pre><code>&lt;head&gt;
      &lt;script type="text/javascript"&gt;
          function PKIInstallCheck() {
              if (document.getElementById('capsLock').value == "true"){
                  alert ("Caps Lock On");
              }
              // call PKI ActiveX...
          }
      &lt;/script&gt;
  &lt;/head&gt; 
  &lt;body&gt;
      &lt;form&gt;
          &lt;asp:ImageButton OnClientClick="return PKIInstallCheck()" runat="server"/&gt;
          &lt;input type="hidden" id="capsLock" name="capsLock" runat="server"/&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <h1>in cs (short code)</h1>
  
  <pre><code>using System;
  using System.windows.forms;
  ...
  
  public partial class @@@@ : System.Web.UI.Page
  {
      protected void Page_Load(object sender, EventArgs e)
      {
          if(Control.IsKeyLocked(Keys.CapsLock))
              capsLock.Value = "true";
          else
              capsLock.Value = "False";
      }
  }
  </code></pre>
  
  <p>But this code just alert CapsLock state on server side.
  I want to know client's CapsLock state. How can i? </p>