The invention discloses a keyboard circuit capable of improving key-press scanning speed. In the keyboard circuit, one ends of each column line and row line are connected with a power supply through a current limiting resistor; the other ends of the column line which are multiplexed by a PNP (positive-negative-positive) switching transistor and the other ends of the m column lines which are multiplexed by an NPN (negative-positive-negative) switching transistor are connected correspondingly with the I / O interfaces, namely P1.1, P1.2,...,P1.m after being multiplexed; meanwhile, the half of therest column lines which are multiplexed by the PNP switching transistor and the other half which are multiplexed by the NPN switching transistor are correspondingly connected with I / O interfaces, namely P[1.(m+1)], P[1.(m+2)],...,P[1.(m +n) / 2]; the base of each switching transistor is connected to the I / O interface P[1.0] through the current limiting resistor; the column line and the row line of each key-press are connected with the ground wire through a combination switch; all the column lines are connected to the inputs of interrupt Input port through an AND circuit unit. The keyboard circuit provided by the invention has the advantages that when the sum of the column lines and the row lines of the key circuit is 2N, the required number of the I / O interfaces is N+1, and when the sum of the column lines and the row lines is 2N+1, the required number of the I / O interfaces is N+2 and the values of column and the row can be obtained after scanning for two times.