I've run into a particularly confusing bit of my engine.

I'm building a class from scratch that handles user input from the keyboard. The original intention was to use this class solely for handling the control set during gameplay, but now I'm puzzled about how to incorporate user input during game states beyond gameplay.

Ideally, the user input class would act as a single entry point of key presses, then the values would be processed according to the state of the game. However, I don't know if this is best.

During pause, character selection, and other menu driven systems aside from gameplay, I will need to retain the arrow keys, the escape key, and the enter key for option selection. During chat mode (talking to other players during gameplay) or data entry, I will need to restrict recognized keypresses to either alpha-numeric or simply numeric.

Should I use a listening event handler within the menu class, user input class, and text entry class, then conditionally allow only one to operate at a given time, or should I use different methods of the user input class based on which scenario I'm in?