Alfred Vail is the true inventor of Morse code, as we know it today.
In 1838 he demonstrated a telegraph code he devised using dots and dashes as letters. A predecessor to Samuel Morse's code, Vail transmitted the message "a patient waiter is no loser."
Vail was the son of wealthy industrialist, who had planned to join the Presbyterian Church on graduating from New York University, until illness forced him to change plans and invest his future in the telegraph instead. He bought a stake in Samuel Morse's telegraph, and agreed to build the system's hardware and secure the American and foreign patents.
The system had some problems printing out messages clearly, so Vail devised improvements. They didn't solve everything, and he was forced to create a completely new printing mechanism - and a new code to make it work.
This was the first time 'Morse' code was created using dashes and dots, which actually wasn't much like Morse's original code at all. So in fact the true inventor of Morse Code was Vail, but Morse - being the better-known partner and personality - kept the glory himself!
Excerpt from: www.connected-earth.com