Ever wanted to create the en-dash and em-dash on a keyboard? The hyphen is easy to find on the keyboard, and typically word processors automatically create the en-dash when you separate two words with a single hyphen.
Many characters can be difficult to type, including certain native letters. And while it's typically easy to change the keyboard language, it can be rather annoying having to change back and forth between different languages. To avoid this, its sometimes easier to simply type the numeric code on the numpad of your keyboard.
Typing en-dash and em-dash on the keyboard
PC: This is maybe the easiest way to create the en-dash. Start by holding ALT, then type one of the numeric sequences, 0150 for en-dash, and 0151 for em-dash, on the numpad.
OS X: To create the en-dash, hold down the Option key, and hit the normal hyphen (-) on the keyboard. To create the em dash, Option+Shift+-
Creating dashes in Microsoft word
To create the en-dash in word, you can create a hyphen between two words and two spaces, and the en-dash will automatically show up (word - word). Making two hyphen between two words, without spaces, will make the em-dash (word--word).
An alternative way to create the en-dash and em-dash, is to hold CTRL+ALT+minus, and this is the minus key in the numpad – and nut the hyphen on the normal keyboard.
Creating dashes in HTML
Typically you do not need to use the HTML codes for dashes if you are using the UTF-8 character set, as they are already supported natively, and therefor they don't need to be encoded.
The HTML codes are listed below, in case you should still need them for some reason.