What ‐ means
The keyboard mark does two jobs; this hyphen does one.
The key beside 0 types the hyphen-minus, inherited from the old ASCII character set, where one mark had to act as both hyphen and minus sign. The typographic hyphen ‐ means only “hyphen”. Fonts often draw them the same, but computers compare characters, not shapes.
What does a hyphen do?
It connects word parts or marks a word's continuation.
In English, placement can change the scene: a man-eating shark eats people; a man eating shark is having dinner. The little mark decides whose lunch it is. Compound spelling and prefix rules differ between languages, so the English example is not a universal recipe.
A hyphen can also mark where a word is divided at the end of a line. An ordinary hyphen may allow a line break after it; if the joined expression must stay together, use a non-breaking hyphen.
Where did the hyphen come from?
It evolved from earlier joining marks. In ancient Greek grammatical writing, a curved under-tie showed that text should be read together; it was not yet a short horizontal stroke.
As word spacing spread in the Middle Ages, related marks took on joining words and dividing them at line ends. English compound hyphenation is attested from the 16th century. The minus sign's similar look does not mean a shared origin.
Don't confuse it with
5Questions people ask
1Will ‐ break my search or code?
It can. Search boxes, spreadsheets and programming languages treat ‐ and - as different characters, so A‐12 may not match A-12, and ‐ does not work as a minus in formulas.
How to type ‐
‐\2010Codes and encoding1 code points
A visible symbol can contain several code points. JS .length counts UTF-16 units; UTF-8 counts bytes.

