title: How can I display KeyCode and KeyData for lowercase letters in c# winforms
body: <p>I'm trying to show informations on the Keyboard Keys pressed.<br>
  This code displays the Uppercase letters correctly, but the Uppercase information is shown also when a lowercase letter is pressed.<br></p>
  
  <p>How can I solve this problem?
  Here is what I am trying to do:<br></p>
  
  <pre><code>public partial class keyDemo : Form
  {
      private void keyDemo_KeyPress(object sender, KeyPressEventArgs e)
      {
          charLabel.Text = $"Key pressed: {e.KeyChar}";
      }
  
      private void keyDemo_KeyDown(object sender, KeyEventArgs e)
      {
          keyInfoLabel.Text =
              $"Alt: {(e.Alt ? "Yes" : "No")}\n" +
              $"Shift: {(e.Shift ? "Yes" : "No")}\n" +
              $"Ctrl: {(e.Control ? "Yes" : "No")}\n" +
              $"KeyCode: {e.KeyCode}\n" +
              $"KeyData: {e.KeyData}\n" +
              $"KeyValue: {e.KeyValue}";
      }
  
      private void keyDemo_KeyUp(object sender, KeyEventArgs e)
      {
          charLabel.Text = "";
          keyInfoLabel.Text = "";
      }
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/3ZQ5S.png" alt="it shows uppercase info but the pressed key is lowercase"></p>