On Windows you can also use GetAsyncKeyState to get the state of a specific key using one of VK_[xxx] virtual codes and even detect whether the key has been pressed or not previously.