Keyboard scanning positioning method

A keyboard scanning positioning method includes initializing a keyboard, waiting a keyboard scanning sampling time, taking samples and reading current state key values, judging whether the key state is stable, combining the current state key values to be a current state state code, timing the current keyboard state maintaining time, checking a state code table to obtain state numbers and key numbers, determining the key numbers according to the state numbers and the keyboard state maintaining time, processing the key numbers and the like. According to the keyboard scanning positioning method, keyboard operation and keyboard states are converted to the state code to be stored in the table, the key numbers are obtained in a mode of checking the state number table, and effective operations are performed after single key operation, combined key operation and keyboard state maintaining for a period in the same method. The size of the state code table is simply needed to be increased or decreased or the key numbers corresponding to the state numbers in the state number table are simply needed to be adjusted when the key operation function is increased or decreased or adjusted.