A method for placing a microprocessor, having a clock generating a clock signal with a first frequency, into a sleep state while the microprocessor waits for data input from a keyboard, the method being performed in a system controller coupled to said microprocessor and comprising the steps of:
- (a) counting a number of times the microprocessor has tried to read data from the keyboard in a predefined amount of time;
- (b) comparing said number of times the microprocessor tried to read data in the predefined amount of time with a predefined minimum number;
- (c) comparing the variance in said number of times the microprocessor tried to read data in a predefined amount of time to a predefined variance amount, if a number of tries exceeded said predefined minimum number;
- (d) comparing a length of time that both said number of times the microprocessor tried to read data exceeded said predefined minimum number and the result was less than the predefined variance to a predefined minimum time if the variance was less than the predefined variance;
- and
- (e) placing the computer into a sleep state if the length of time exceeded the minimum time, wherein in said sleep state, the clock signal has a second frequency.