The parallel cable for the keyboard reminded me of a hack I did back in the day, stripping wires from two SNES controllers and connecting them to a DB25 connector to plug into the parallel port of my PC running MAME. The cool thing with the parallel port is that you can control most of the pins individually, so it was pretty trivial to write a driver to send/receive the control messages the SNES controllers expected.
You can still just direct solder to any of the shelf controller pcb to make your own devices. There are also more resources out there than ever before for creating your own inputs.
I don't know about the Xbox side of things, but ps4/5 there's an 8 minute lockout if it's not an officially license controller[1]. Ways around this are taking an official PCB from a ps4/5 controller and soldering external buttons to it. Another is getting a pcb with a usb passthru, which you can use something like a magicboot, which you load up with controller firmware/binary file, which is not an officially supported method, you're technically supposed to dump your own from an existing controller you own, but still I don't know the real legality of that all either.
https://youtu.be/Ug06dhahqg0
1) https://gp2040-ce.info/faq/faq-console-compatibility/#why-do...