A keyboard includes: a key panel that includes: a plurality of keys that
are respectively assigned to input characters and symbols, the keys
including a specific key that is assigned to input a pair of characters
by a single keystroke; and a plurality of switches that are provided for
each of the keys to output an electrical signal unique to each of the
keys when the keys are pressed; and a controller that detects the
electrical signal output from the key panel and outputs a key code
corresponding to the electrical signal, the controller being configured
to operate to: determine whether the specific key is pressed by detecting
the electrical signal; and output multiple key codes including key codes
corresponding to the pair of characters when determined that the specific
key is pressed.