title: Keyboard class implementation in windows application
body: <p>I want to implement a Keyboard class like below;</p>
  
  <pre><code>class Keyboard
  {
  public:
      Keyboard();
      ~Keyboard();
      bool IsKeyDown(Key);
      bool IsKeyUp(Key);
      void SetPressedKey(int);
      void SetReleasedKey(int);
  private:
      Key pressedKey;
      Key releasedKey;
  };
  </code></pre>
  
  <p>Key is an enum like below;</p>
  
  <pre><code>enum Key
  {
      A,
      Enter,
      Up,
      Down
  };
  </code></pre>
  
  <p>Here is the window callback function;</p>
  
  <pre><code>case WM_KEYDOWN:
      kb.SetPressedKey(wParam);
      break;
  case WM_KEYUP:
      kb.SetReleasedKey(wParam);
      break;
  </code></pre>
  
  <p>First of all, my design can be completely wrong. If it's an acceptable design, there are some questions that I couldn't answer. Can value of the pressedKey be overwritten if user presses two buttons at the same time and how can I determine if user uses combinations like CTRL+C. The other question is I couldn't find a way to make a relationship between wParam's value and enum keys' indexes.</p>