disclosed is a scanning circuit for an electrical matrix keyboard . the keyboard has extended keys on a voltage line and a ground line . two extended line detector are incorporated into the circuit for detecting the extended keys without increasing input and output ports of the circuit , so that the circuit can be integrated into a chip at a lower cost .