This was actually Morse code which was introduced in the 1840’s which used a system of the following to communicate characters:
short signal (dot)
long signal (dash)
short space
long space
It was a reflection of very limited technical capability of the mediums that morse code was sent over and the fact that morse code had to be tapped out by human operators.