Quick input digit method and device
[technical field]
The present invention relates to a kind of digital input method and device, relates to a kind of method and device that uses the quick input digit of numeric keypad specifically.
[background technology]
Its numerical key of traditional mobile computer and English key system make with the bifurcation function, whether it is under text button pattern or numerical key pattern, doing judgement with the mark of computer-internal entirely judges with the LED lamp on the keyboard, when the input file of compound text button and numerical key, must be cut into type mode quickly, be cut into figure pattern quickly, very inconvenient.
So there is the people just to add a QWERTY keyboard more again on mobile computer, this problem of deriving again is exactly not portable, and keyboard is too big, has and runs counter to the compact Portability principle of mobile computer.
In view of this someone designs the keypad that has only numerical key again, but the residing pattern of its keyboard is done judgement with the mark of computer-internal entirely and judged no material alteration with the LED lamp on the keyboard with the state striking resemblances on the mobile computer keyboard.
Chinese patent application has disclosed a kind of command switch-over method of key groups for No. 00102878.2, it is a good detecting NUM LOCK position status function in keyboard controller, when the activation of NUM LOCK position, can reach input function as long as send the sign indicating number of numerical key, but when the decapacitation of NUM LOCK position (when just NUM LOCK LED goes out), its sign indicating number that must send NUM LOCK is to computing machine, via system validation with NUM LOCK position activation, and send order NUM LOCK lamp is lighted then, again the one key sign indicating number of numerical key is delivered to computing machine, keyboard controller in the keyboard send the sign indicating number of a NUMLOCK automatically again to computing machine then, via system validation with NUM LOCK position decapacitation, and send sign indicating number that order extinguishes NUM LOCK lamp to keyboard controller, keyboard controller is carried out then, just the LED lamp with NUMLOCK extinguishes, and expends long time, reduces execution speed.
For instance: the NUM LOCK position of computing machine is decapacitation at present, just keyboard is under the English mode, this moment, keypad naturally was exactly a cursor function, and will import " 123 ", method with the technology 4 of above-mentioned habit, must keyboard controller judge NUM LOCK position earlier, the sign indicating number that send NUM LOCK is to computing machine, via system validation with NUM LOCK position activation, on the keyboard LED lamp light and then will " 1 " key set code deliver to computing machine, and then the sign indicating number that send a NUM LOCK is extinguishing NUM LOCK LED via system validation to computing machine.
And then send NUM LOCK the sign indicating number to computing machine, NUM LOCK lamp is being lighted and then the key set code of numerical key " 2 " is being delivered to computing machine via system validation, and then the sign indicating number that send a NUMLOCK is extinguishing NUM LOCK LED via system validation to computing machine.
Then again send NUM LOCK the sign indicating number to computing machine, the NUMLOCK lamp is being lighted and then the key set code of numerical key " 3 " is being delivered to computing machine via system validation, and then send a NUM LOCK the sign indicating number to computing machine, via system validation NUM LOCK LED is being extinguished, because system must confirm this NUM LOCK position state, ordering the state that changes NUMLED on the keyboard then, cause the NUM LED flicker on the mobile computer, whole speed becomes very slow, and LED transition between flickering causes the waste of the energy again.
Chinese patent application has disclosed a kind of switching handling method of keyboard instruction input pattern for No. 00103036.1, No. the 00102878.2nd, its functional method and patented claim are roughly the same, the switching handling method of main following 1. 1 kinds of keyboard instruction input patterns, this method comprises:
A), either party must keep the requirement of certain state not force Master Keyboard or auxiliary keyboard;
B), the state of Master Keyboard or auxiliary keyboard why, auxiliary keyboard software is used the state flag current state of memory Master Keyboard and auxiliary keyboard earlier;
C), when pressing any key of auxiliary keyboard, auxiliary keyboard software can go to judge whether the state of the Master Keyboard that has the inner flag of auxiliary keyboard identical with the state of auxiliary keyboard, if then directly send keypad code; If not, then can send the number lock sign indicating number and give main frame, it is identical with the state of auxiliary keyboard to allow the Master Keyboard state become, so that receive the keypad code of auxiliary keyboard, then send keypad code and give main frame, and then send the number lock sign indicating number to give main frame, with the state reduction of Master Keyboard, and auxiliary keyboard still maintains original state.
This technical scheme is sent key set code then because of being in transition always, and there are problems such as speed is slow, energy dissipation equally in transition reduction then.
Therefore, prior art is improved, provided a kind of transmission time short, power consumption is few, can significantly lower keyboard and main frame transmission load, and the method for input number keyboard is necessity in fact fast to speed execution speed.
[summary of the invention]
The purpose of this invention is to provide a kind of transmission time short, the transmission load is low, power consumption less, fast quick input digit method and the device of execution speed.
To achieve these goals, the present invention adopts following technical scheme:
A kind of quick input digit method is provided, and it comprises as follows:
(1) at first carries out key scan and judge that also memory has or not button to press Num lock key, find to push button, then carry out the affirmation key position;
(2) after confirming key position, differentiate the Num lock flag state that is arranged at computer-internal;
(3) if Num lock flag state is activation, then by directly sending corresponding key set code behind the first digit key; If Num lock flag state is decapacitation, then, and then send digital key by the numerical code function that before sending sign indicating number, can send Num lock behind the first digit key earlier.
(4) if press numerical key again in certain time interval, then keyboard is no longer sent the key set code of NUM LOCK before each numerical key, and directly sends digital key.
(5) if do not press numerical key again in certain time interval, then keyboard can be sent the Numlock key automatically, so that NUM LOCK mark restores.
Auxiliary input device is provided with and the synchronous flag state of computing machine Num lock flag state, and when Num lock flag state is activation, auxiliary input device is a synchronous regime, can directly send corresponding key set code; When Num lock flag state is decapacitation, auxiliary input device is an asynchronous mode, sends the numerical code function of Num lock earlier, sends digital key then.When Num lock flag state is decapacitation, auxiliary input device is a synchronous regime, and auxiliary input device is sent the literal key.
In step (1), system can be arranged at the delay mechanism of latency delays input behind the memory Num lock bonded state.
Step (2)~(3) operation capable of circulation, step (2)~(5) operation also capable of circulation.
The present invention provides a kind of numerical key auxiliary input device that uses above-mentioned quick input digit method again, it comprises computer equipment, this computer equipment comprises keyboard controller and numerical value load module key, and this numerical value load module key is connected with the input-output line of keyboard controller.
This numerical key auxiliary input device can be connected with USB general-purpose interface joint, so that patch on computing machine, can be printed with the above numeral of at least two kinds of functions, symbol on each keycap of this numerical key auxiliary input device, selects to use for the user.
Compared with prior art, the present invention has following beneficial effect:
Quick input digit method of the present invention and device can provide the transmission time short, the transmission load is low, power consumption less, the fast numeral of execution speed keys in.
[description of drawings]
Fig. 1 is the schematic flow sheet of the quick input digit method of the present invention when main frame NumLock is bright;
Fig. 2 is the schematic flow sheet of the quick input digit method of the present invention when main frame NumLock goes out;
Fig. 3 is to use the input equipment synoptic diagram of the quick input digit method of the present invention.
[embodiment]
Please refer to Fig. 1~Fig. 3, a kind of numerical key auxiliary input device, it comprises computer equipment, and this computer equipment comprises keyboard controller and numerical value load module key, and this numerical value load module key is connected with the input-output line of keyboard controller.As shown in Figure 3, the Master Keyboard in the dotted line is the keyboard that mobile computer is used, and it is matched in the housing that a housing maybe can separate with main frame, and the servicing unit of this creation is connected with main frame through transmission line.
This numerical key auxiliary input device can be connected with USB general-purpose interface joint, so that patch on computing machine, can be printed with the above numeral of at least two kinds of functions, symbol on each keycap of this numerical key auxiliary input device, selects to use for the user.
The numerical key auxiliary input device adopts a kind of quick input digit method input number keyboard, and its method is as follows:
The status indication of this servicing unit can be remembered the Num Lock status indication of main frame and the sync mark state of present servicing unit, when servicing unit was arranged at asynchronous mode, the key set code of being sent by servicing unit all can make main frame be presented the function of numeral.
When main frame was Num Lock activation, the key set code of sending from servicing unit when servicing unit is arranged at synchronous regime did not need to send the key set code of NumLock earlier and then sends the key set code of numeral, just can reach the function of display digit.
When main frame was Num Lock decapacitation, the key set code of sending from servicing unit when servicing unit is arranged at synchronous regime was a cursor function.
In the time of main frame Num Lock decapacitation, when servicing unit is arranged at asynchronous mode, the key set code of sending from the keyboard of main frame is a literal function, and we from servicing unit send the sign indicating number can send earlier NumLock send then the numeral key set code to main frame, the keyboard controller of servicing unit can be waited for after finishing, wait for the numerical key input whether other is arranged, import then because Num Lock this moment is bright as numerical key, so directly send this numeral key, the keyboard controller of servicing unit can be waited for then, goes round and begins again.Arrive when the stand-by period of keyboard controller, but not from the servicing unit input number keyboard, servicing unit can be sent Num Lock sign indicating number again and be returned to original state at this moment, just the literal input state.
In the time of main frame Num Lock activation, when servicing unit is arranged at asynchronous mode, the key set code of sending from the keyboard of main frame is a digital function, and the sign indicating number that we send from servicing unit can be sent the key set code of NumLock earlier, make that main frame is a literal function, and servicing unit enters cursor function, the key set code of sending numeral then is to main frame, what can show at main frame is cursor function, the keyboard controller of servicing unit can be waited for after finishing, wait for the cursor key input whether other is arranged, import then because Num Lock this moment goes out as cursor key, so directly send this vernier key, the keyboard controller of servicing unit can be waited for then, goes round and begins again.Arrive when the stand-by period of keyboard controller, but not from the servicing unit input number keyboard, servicing unit can be sent Num Lock sign indicating number again and be returned to original state, just digital input state at this moment.
Gu the keyboard controller on this numerical value mansion time keyboard has on the creation increased the mechanism of waiting for, make that the NUM LED on the main frame need not be busy with flicker, it is very slow that the speed of whole computer system is become, and has the wisdomization dexterityization, more humane.