question mark icon morse code icon

What is this ?

This custom project started as a challenge to convert keyboard inputs to morse code. It grew into a single page discovery tool to learn morse. It also acts as a showcase of how 3D can enhance web experience.


What do I do with it ?

This tool is meant to be used two ways. You can write morse code by holding and letting go of the SPACE key, and see what your code translates to. Or you can write in plain text and see how it encodes in morse.

Several tools can assist you. A help panel provides international morse alphabet for reference. An accuracy score shows how steady and even your morse inputs are.


What is it made with ?

No programming framework has been used for this page. You can find the Github source code here.

The keyboard-to-morse encoding is done with a custom script. The morse-to-alphabet translation is handled by a third party library (credits to OZDEMIRBURAK).

The 3D background uses Babylon.js, an opensource engine by Microsoft designed for the web.

All the scripts are made using Typescript.


How does morse code work ?

Writing morse is a matter of timing. The code is made of sounds and spaces. Holding the key down will play a continuous signal until the key is released. There is no specific length to these signals, they have to be steady and proportional.

There are two kinds of sounds : dots and dashes. A dot is the shortest duration, and act as the duration unit. A dash lasts as long as three dots.

There are three kinds of spaces : signal spaces have the same duration as a dot, and are used between each signals (they translate to nothing in morse). Letter spaces last three dots, and are used between letters (they translate to a single space in morse). Word spaces last seven dots, and are used between words (they translate to a / in morse).

For example, if you send a signal with a rythm of 1 dot = 1 second, this is how you would send an SOS :
Hold the key 1 second. Release and wait 1 second. Hold 1 second. Release 1 second. Hold 1 second.
Wait 3 seconds.
Hold the key 3 seconds. Release 1 second. Hold 3 seconds. Release 1 second. Hold 3 seconds.
Wait 3 seconds.
Hold the key 1 second. Release and wait 1 second. Hold 1 second. Release 1 second. Hold 1 second.

Try it out ! The international code is below for reference.


International Morse Code

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
· —
— · · ·
— · — ·
— · ·
·
· · — ·
— — ·
· · · ·
· ·
· — — —
— · —
· — · ·
— —
— ·
— — —
· — — ·
— — · —
· — ·
· · ·

U
V
W
X
Y
Z




1
2
3
4
5
6
7
8
9
0
· · —
· · · —
· — ——
— · · —
— · — —
— — · ·




· — — — —
· · — — —
· · · — —
· · · · —
· · · · ·
— · · · ·
— — · · ·
— — — · ·
— — — — ·
— — — — —
·/-
A-Z
trash bin icon