I want to know if there is any standard function that can respond to instantaneous keyboard state. For example, I call a function, getKey();, and this function returns the ASCII code of the key pressed at that instance, otherwise returns if no key is pressed at the same instance.