Various systems of electrical telegraphy were developed from the 1770s onward. Some of these were very inefficient, but Carl Friedrich Gauss came up with a fairly robust system involving inductive pulses that send a needle at the receiving end either left or right, and developed an alphabetic code in 1833. It took about 6 seconds on average to transmit a one letter.

Carl August Steinheil used a system based on Gauss’s ideas (but with a different code) in a large field trial in Munich some years later.
Employers were not keen on systems that required codes and training, which is probably why the first commercial system, that of Wheatstone and Cooke, did not use codes.
W&C patented various systems using multiple needles, but their first commercial success came with a five needle system, which required five wires in parallel.
The sender had two rows of keys, and selected a key from each row to choose a letter from a grid. The receiving board had five needles that could either be deflected left or right, or remain vertical when not selected. The two deflected needles pointed to the chosen letter in a grid.

This system was the basis for the first commercial telegraph, the Paddington to West Drayton telegraph in 1938. As you can see on the board there are only 20 letters: C, J, Q, U, X, and Z are omitted, and were represented by K/S, G, KW, V, KS and S. There was no spacebar, punctuation or lower-case. Numerrals were indicated by deflecting only one needle. The system was mostly for use by the railway.
Over the following years the system was simplified to three needle and two needle versions which did require the use of codes and more staff training. In 1845 this needle telegraph system was used in the apprehension of a murderer who was fleeing by train.
More details on the operation can be found starting on page 200 of this Telegraph Manual published in 1859.
https://archive.org/stream/telegraphmanualc00shafrich#page/206/mode/2up