I think you're talking about emulating mouse, keyboard or gamepads, and not just getting limited by mouse and keyboard emulation provided by most applications.
For a software to emulate a gamepad, it needs to install its own gamepad driver or fake a DirectInput or XInput library and install it on the target application's directory for it to work. Either options require low level programming and are hard to develop, so a software with this functionality is also hard to find.
I never used a software to emulate a gamepad directly, but I heard about GlovePIE. GlovePIE is scriptable, so you can make it do anything in any way you want and you can emulate any device with any device; for example, you can emulate a gamepad with a keyboard, a mouse with a gamepad, a MIDI controller with a gamepad, etc.
Right now, it seems that GlovePIE web page is having problems, but you can search about it on Internet.
Here, you can get it along with more information on how to use it:
https://www.engadget.com/2007/06/12/revolutionary-introducing-glovepie/