Or you could make life a whole lot simpler and just use a switch() statement to call functions based on your keyboard input.