Impossible I guess, but one thing you can do is the up and down button, just ignore camera movement when the right mouse button is pressed and when it is not, you'll find out which way the player goes(up/down) and can do up/down on the buttons, to make it ignore any camera movements on screen you can store a variable in the end of each loop which tells if the movement is changed and if it is, move the camera to the old position. Though keys like "1","2" or "3" is as far as I am concerned impossible :/