How can I type U+200B character?

How can I type the unicode character U+200B (zero-width space character) with my keyboard?


Solution 1:

When using recent versions of Chrome/Chromium, you can use its console to copy the character to clipboard:

copy("\u200B")         // works for BMP characters only (U+0000 to U+FFFF)
copy("\u{200B}")       // works for all characters (U+0000 to U+10FFFF)

copy(String.fromCodePoint(0x200B))

Solution 2:

First convert the hex 200B to decimal 8203

Second, making sure numlock is turned on, press the following keystrokes while holding down the Alt key, then striking the four digits on the numeric keypad, and finally releasing the Alt key.

Alt+8203

It will insert the proper character, but you may see garbage depending on the font you are using (does it contain a glyph for that character) as well as the editor you are using may not be unicode aware and treat it as two characters or something else completely.

Note: I tested this with the Arial Unicode MS font, and it worked like a champ.

Solution 3:

Follow the instructions in Wikipedia. Unfortunately you need to set a registry key first.

After that formality is taken care of, just hold Alt and press + 2 0 0 B, typing the + and numbers on the numpad, and the letters normally.