How to check if a key is down?
Hi, I want to check if a keyboard key is down or up. How can I do that? For example, while ctrl is down I want to lock the position of the mouse cursor and only check the movement of the mouse, and when ctrl is up the user should be able to move the mouse cursor freely. If the implementation is platform dependent, the platform used is Windows.
Note: I want to do this as fast as the program starts, and I would rather want to know if there is any key down from the beginning.