These days, thanks to malware and the fact that everything is connected online, spying seems to have gotten a lot easier, where information like keystrokes, files stored on servers, and data being transmitted can be easily intercepted. However, back in the day when things were largely offline, it can be a lot harder.
However, it seems that this did not dissuade Soviet-era spies who apparently bugged a typewriter inside of the American embassy during the Cold War. In a report from Spectrum, it details a story in a book titled The Spy in Moscow Station written by Eric Haseltine, in which an electrical engineer at the United States’ National Security Agency by the name of Charles Gandy discovered a bug in the typewriter.
Suspicions arose when it was discovered (by accident) that there was a false chimney cavity installed inside of the American embassy in Moscow. Gandy had initially faced some resistance during his investigation, but once he was given permission to proceed, the electronics in the embassy were sent back to the US where they were disassembled and X-rayed.
He then discovered within an IBM Selectric typewriter hidden components that would basically log keystrokes and send that information across multiple frequencies. These frequencies would also be low-powered enough where they could be hidden from embassy security scans. That being said, this happened decades ago, but it is still very interesting to see how ingenious spying methods were back then.