Can you set speakers to produce any frequencies that you wish
Not any – I don't know the general range, but it definitely depends on the quality of the speakers, as well as your sound card (the "DAC", I believe). They're optimized for voice and music, and don't need to care about the rest. The same applies in the other direction (recording) as well.
However, it's doable even with a fairly limited frequency range – just look at good old dial-up modems (which originally used an acoustic coupler directly to a telephone handset).
As far as I know, they don't just use a different frequency for every byte, but encode individual bits. (Just like electrical communications don't use a different voltage for every byte, either...)
(As another example, recently various products have started using ultrasound to transmit secret keys and other pairing information, e.g. when connecting a phone app to a camera and such.)
As mentioned in the comments, you could start with the DTMF standard which can encode 16 different keypresses.
I voted to close this as primarily opinion based - the programming language to use is up for debate - and there are multiple ways of handling it. You can indeed set speakers to produce frequencies you wish - which should be obvious as they reproduce raw voice frequencies. If it were me, I'd be inclined to convert the letters into numbers and then use the established DTMF method for coding and decoding transmitted sounds - of-course, DTMF actually uses a pair of frequencies. – davidgo – 2017-09-25T04:37:32.920
This is opinion based. You didn't even specify which operating system or type of computer you would be using? Or, if you would be using a computer at all. I could assume you are plugging your keyboard in to a USB interface IC and piping the digital data to some NAND gates and a couple 555 based tone generators hooked to an 8 ohm speaker. I really don't know. But based on the fact you mentioned "programming" I'm going to take a stab and say you might be using a windows computer in which case you could do this with a single line of powershell code. – Appleoddity – 2017-09-25T04:46:12.493