Patent ID: 7138980

Claim:
A method for selectively providing a scrolling function on a keyboard having at least one cursor key and a hot key for use with a data processing system having a central processing unit (CPU) and a screen, said hot key being selectively at a first status and a second status, comprising: setting a value of a flag to be a first value; detecting whether status of said hot key is changed; changing said value of said flag to be a second value when said status of said hot key is changed; determining whether said value of said flag is said first value to generate a result; determining a corresponding key code of said cursor key according to said result, wherein when said value of said flag is said first value, said corresponding key code of said cursor key is a first key code, when said value of said flag is said second value, said corresponding key code of said cursor key is a second key code; and transmitting said corresponding key code to said central processing unit when said cursor key is operated so that said first key code is for controlling a cursor movement on said screen, and said second key code is for scrolling data displayed on said screen.