To make it possible to comply with the application of key devices at a plurality of locations with a higher security key device which uses infrared rays and additional single key equipment.
A key device is provided with a key hole 32 having a specified shape and depth in a cross section which is open on the surface of a door main body 16 or near the wall surface and an infrared rays light receiving section 33 which is laid out at the depth of the key hole housed in the door main body or in the wall so as to face the key hole optically, a motor locking mechanism 37 which governs the opening of the door main body and a key control circuit 36. Then, a key equipment 50 provides a post-like portion 51b insertible into the key hole and arranged to include an infrared light emitter 56 provided with a light emitting end 58 at the position at which the light emitting end is optically faced with the infrared rays light receiver when it is inserted into the key hole at a specified depth and a light emitting indication means 52 designed to radiate an infrared signal including a password code which can be arbitrarily set and the key control circuit.