Back in the early days of USB, Microsoft mouse devices often came with a USB plug at the end of the cable, but also came with a small green adapter to convert the USB type-A plug into a PS/2 plug. How did this adapter work?
USB and PS/2 are completely different protocols that are not compatible in any way. The adapter was purely mechanical (passive). It connected one set of pins to another, but it contained no circuitry. All of the smarts was in the mouse.
The mouse detected whether it received USB-like signals or PS/2-like signals on the pins and changed its behavior accordingly. The mouse did all the work.
It’s similar to the inexpensive electrical outlet adapters which convert between different national plug types. There are no smarts in the adapter. It just connects one set of plugs to another. The actual intelligence is in the appliance itself (or the power brick for the appliance).
So if you find one of these adapters in your junk drawer, be aware that it is not a universal mouse adapter. It is just a physical adapter; the actual conversion happens in the dual-bus mouse on the other end.
Bonus chatter: An Internet search shows that people still make these types of mouse adapters. I don’t know whether the ones you can buy today are smart adapters that translate between the PS/2 and USB signaling protocols, or whether they are purely mechanical adapters that rely on the mouse to do the work.
Almost all of the USB to PS/2 mouse adapters are purely rewiring as you say Raymond, but one isn't : HIDMan. That will accept USB keyboards and mice (up to five buttons) and output PS/2 (or serial mouse). It can be fairly easily made at popular PCB fabrication places as it's open source. I've recently had a few made and they're excellent, enabling me to use a modern remappable USB keyboard, and will help if I want move on from my Logitech MX518, probably the last multi button mouse to support both PS/2 and USB directly.
To go the other way,...
Pretend that this is an image of an usb flash drive attached to such an adapter, which is plugged into a PS/2 to serial adapter, plugged into a small to wide serial port adapter, plugged into a dialup modem.
You can buy both these days. I still use the Microsoft Natural Elite Keyboards and often an eBay find of one doesn’t come with the adapter for USB. Thankfully the passive PS/2 adapters for mice also work for the keyboards. The active adapters work, but tend to be a little glitchy at times.
The passive adapters working with mice and keyboards is no surprise, since the PS/2 pinouts are the same.
I guess there’s a chance that some devices would use a reverse USB D+,D- -> PS/2 CLK, DATA mapping, but it seems unlikely because it’s simpler and cheaper to standardise on one adapter pinout.
There are definitely smart adaptors available, I use them all the time since I use a IBM Model M keyboard on a daily basis with various PCs that don’t have PS/2 ports.
Raymond is talking about the other way : USB to PS/2. The only active converter I'm aware of that's reliable is HIDMan.
I was using Unicomp's Endura Pro and Classic keyboards, pretty similar to a Model M, but when they died I had the old school choice : lead time, expense, and overseas shipping of a niche PS/2 keyboard with a Dvorak layout programmed. Alternatively, the modern way : buy a programmable keyboard off the shelf and order a HIDMan.
The HIDMan is great, the Montech TKL keyboard I bought a bit less so! Key action is OK but could...
It probably depends to some extent on the manufacturer, but I have a couple of PS/2-to-USB adapters with transparent blue cases (thus providing a pretty good estimate of when I acquired them) that definitely contain smarts.
Not enough smarts, though – they don’t properly implement the USB boot keyboard specification, so you still need a proper USB keyboard to do anything with the BIOS.