Get last pressed keyboard key
<p>I'm trying to get the last pressed keyboard key, but since I'm working in a game, the code will be ran each tick.
I tried getchar() but it results in a crash/freeze, how can I acheive this ?</p>

<p>This will only be used on windows 7/8/10</p>