Try looking for disassebled xbox controllers and ps2 controllers . they are just circuit boards that have buttons. i think they also have a special program in them but i could be wrong. thats the best way i can think of. Looking at disassembled ones you should get an idea of how they work.