I am building a game, and I would like to run a function in the background. While the user is playing the game, the user could type the [TAB] key to access a menu list where the user could save, load, quit, etc. Also, while the user is playing the game, I would like to play a midi file in the background (Different function). Simply put, when the user presses the [TAB] key on his/her keyboard, the program should run a certain function. How would I accomplish this?