Send data by serial to a stand alone keyboard emulator

So you have a RS232 module, that goes to what? A Keyboard emulator? What kind of connection does it have, and where are it’s specs. As @ bodward is hinting at, some devices need TTL level signals to communicate, others need RS232; they won’t play nice if you have an RS232 sender connected to something that expects TTL.

What mainboard are you using?

If you’re getting characters that don’t resemble what you sent, then the #1 culprit is baud rate. You need to select a different rate. You need to match the rate that the receiving device expects.

The #1 culprit is UART Dyslexia. Make sure you understand RX and TX are probably meant to be plugged into each other.

The way I would first try to deal with this issue though is to make sure you can receive what you send. Write a program that both sends and receives through your RS232 module. Then, connect the RX and TX together - now everything you send should be echoed into your receive.