How do I check if a Key is pressed on C++
As mentioned by others there’s no cross platform way to do this, but on Windows you can do it like this: The Code below checks if the key ‘A’ is down. In case of shift or similar you will need to pass one of these: https://msdn.microsoft.com/de-de/library/windows/desktop/dd375731(v=vs.85).aspx The low-order bit indicates if key is toggled. Oh and … Read more