PURPOSE: To improve the operability of a key input as a result by allowing an overlay key of a keyboard main body to function as a regular character key, in the case of allowing a numeral key of an external ten key device to function.
CONSTITUTION: Based on the storage contents of a RAM 6, at the time of non-connection state of an external ten key device 2 against a keyboard main body 1, when an NL state is set in advance, a numeral key code is generated in accordance with an operation of an overlay key 3b. At the time of connection state of the external, ten key device 2, a regular character code is generated in accordance with an operation of the overlay key 3b irrespective of the NL state. In this case, the numeral key code is inputted in accordance with setting of the NL state from the external ten key device 2.