Make TSR for keystrokes

    I would like ideas to write a TSR program. What I want is:
When the user press a certain key ('N' for example) the result
is equal of pressing a sequence of keys (like '1','Q','ALT+X');

    If anyone has a suggestion thanks in advance.