The benefit of using a keyboard as the brains of the controller is that it wont require drivers and will be compatible with most operating systems. I was then confident enough to pick up a cheap usb keyboard and sacrifice a controller in decent condition. I ended up combining it with an old PS2 keyboard as a frankenstein style prototype for this instructable. Considering its poor condition, I wanted to sacrifice it for a retro gaming project. I found a janky old NES controller that had seen better days in my cupboard.
I would recommend reading the whole tutorial before starting as understanding the whole process will be of great benefit for completing each step. If you're comfortable with a soldering iron and don't mind working in small spaces, you should be able to make a USB NES controller with cheap and readily available parts. When the NES controllers buttons are activated, they're registered by your computer as a key press. The original buttons activate tact switches that are wired to the keyboard controller.
The basic idea is that the keyboards controller unit is installed in the NES controller housing. This tutorial combines an original NES controller, USB keyboard, wire and tact switches into a USB NES controller suitable for use with NES and arcade emulators.