How do i check to see if a key is being pressed while in a "while()" loop?