const _keys = Dict((k => KeySymbol(k, v) for (k, v) ∈ [
            :shift_right     => "Shift (right)",
            :shift_left      => "Shift (left)",
            :control_right   => "Control (right)",
            :control_left    => "Control (left)",
            :alt_left        => "Alt (left)",
            :alt_gr          => "Alt (Graph)",
            :less            => "<",
            :greater         => ">",
            :twosuperior     => "²",
            :ampersand       => "&",
            :eacute          => "é",
            :quotedbl        => "\"",
            :apostrophe      => "\'",
            :minus           => "-",
            :egrave          => "è",
            :underscore      => "_",
            :ccedilla        => "ç",
            :agrave          => "à",
            :parenleft       => "(",
            :parenright      => ")",
            :equal           => "=",
            :notsign         => "¬",
            :onesuperior     => "¹",
            :asciitilde      => "~",
            :numbersign      => "#",
            :braceleft       => "{",
            :bracketleft     => "[",
            :bar             => "|",
            :grave           => "`",
            :backslash       => "\\",
            :asciicircum     => "^",
            :at              => "@",
            :bracketright    => "]",
            :braceright      => "}",
            :backspace       => "Backspace",
            :enter           => "Enter",
            :insert          => "Insert",
            :delete          => "Delete",
            :home            => "Home",
            :end             => "End",
            :next            => "Next",
            :prior           => "Prior",
            :num_lock        => "NumLock",
            :up              => "↑",
            :down            => "↓",
            :left            => "←",
            :right           => "→",
            :kp_1            => "1 (keypad)",
            :kp_2            => "2 (keypad)",
            :kp_3            => "3 (keypad)",
            :kp_4            => "4 (keypad)",
            :kp_5            => "5 (keypad)",
            :kp_6            => "6 (keypad)",
            :kp_7            => "7 (keypad)",
            :kp_8            => "8 (keypad)",
            :kp_9            => "9 (keypad)",
            :kp_0            => "0 (keypad)",
            :kp_divide       => "/ (keypad)",
            :kp_subtract     => "- (keypad)",
            :kp_multiply     => "* (keypad)",
            :kp_add          => "+ (keypad)",
            :kp_decimal      => ". (keypad)",
            :kp_enter        => "Enter (keypad)",
            :kp_insert       => "Insert (keypad)",
            :kp_delete       => "Delete (keypad)",
            :kp_home         => "Home (keypad)",
            :kp_end          => "End (keypad)",
            :kp_next         => "Next (keypad)",
            :kp_prior        => "Prior (keypad)",
            :kp_up           => "↑ (keypad)",
            :kp_down         => "↓ (keypad)",
            :kp_left         => "← (keypad)",
            :kp_right        => "→ (keypad)",
            :comma           => ",",
            :semicolon       => ";",
            :colon           => ":",
            :exclam          => "!",
            :question        => "?",
            :asterisk        => "*",
            :ugrave          => "ù",
            :dollar          => "\$",
            :dead_circumflex => "^",
            :dead_diaeresis  => "¨",
            :percent         => "%",
            :mu              => "μ",
            :period          => ".",
            :slash           => "/",
            :section         => "§",
            :degree          => "°",
            :plus            => "+",
            :currency        => "¤",
            :sterling        => "£",
            :eurosign        => "€",
]))

is_key_symbol_defined(key) = key ∈ keys(_keys)

"""
Define an internal representation and a readable description for some key inputs.

The keys that are listed here are not exhaustive and only cover a very small subset of all possible keys.
"""
key_symbol(name::Symbol) = _keys[name]
key_symbol(name::AbstractString) = key_symbol(Symbol(name))

Base.show(io::IO, key::KeySymbol) = print(io, key.symbol)
