For this project, I used the chip from an old wireless USB keyboard, an old Gameboy Advanced SP battery, and obviously a NES controller.
The way it works is simple, I took this chip from a keyboard, and all that the keys on a keyboard are, are buttons with connections to this chip in different patterns to differentiate one key from another. So what I did, is I took the traces from the NES controller, and wired them to the board as if they were keys.
One thing you might notice, is that there is no way to charge the unit, I did that on purpose, the reason I felt that it was not necessary right now to add a charging adapter, is that before I had made this mod, the keyboard was turned on for about 2 years without changing the AAA batteries, and they were still running fairly strong. I later added a power switch to the unit to conserve power when not in use. I decided to use it without a charging adapter, and if needed later on, add one, or remove the battery and charge it. It still has not gone dead, and this was built a year ago.