CN106293132B - A kind of method and keyboard filter driving improving keyboard input correctness - Google Patents
A kind of method and keyboard filter driving improving keyboard input correctness Download PDFInfo
- Publication number
- CN106293132B CN106293132B CN201610681143.2A CN201610681143A CN106293132B CN 106293132 B CN106293132 B CN 106293132B CN 201610681143 A CN201610681143 A CN 201610681143A CN 106293132 B CN106293132 B CN 106293132B
- Authority
- CN
- China
- Prior art keywords
- marking keys
- keyboard input
- keyboard
- module
- input information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/023—Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
Abstract
The present invention discloses the method and keyboard filter driving of a kind of raising keyboard input correctness, belongs to electronic equipment input field.This method comprises: keyboard filter driving obtains keyboard input data from system, current keyboard input information is obtained in data entered from the keyboard, current keyboard input data is handled according to current keyboard input information and the correction itself saved mark, after keyboard input data has handled keyboard input information all in keyboard input data, by keyboard input data return system.Keyboard filter driving disclosed by the invention includes: the first acquisition module, the second acquisition module, preserving module, rectification module, the first update module, memory module, the first remove module, the second update module, the second remove module, setup module and return module.Method provided by the invention and keyboard filter driving improve the correctness of keyboard input data.
Description
Technical field
The present invention relates to electronic equipment input field more particularly to a kind of methods and keyboard for improving keyboard input correctness
Filtration drive.
Background technique
The driving framework of Windows is layered shaping, wherein the driving for PS2 keyboard equipment includes that keyboard filter drives
(system keyboard drive includes system key disk bottom layer driving and system keyboard type to the system keyboard drive dynamic, Windows system is included
Driving).PS2 keyboard input data is sent 8042 controllers by PS2 keyboard, and system keyboard drive takes out keyboard from controller
Input data and the keyboard input information for being handled to obtain preset structure, and the keyboard input information of preset structure is transferred to
Keyboard filter driving.PS2 keyboard input data may have a byte or two bytes, and receive PS2 keyboard input data
Controller can only receive the data of a byte every time;Keyboard filter is driven to prevent PS2 keyboard input in 8042 controllers
Keyboard input data is stolen, and may access simultaneously 8042 controllers with PS2 keyboard, sends Simulation of keyboard input number to controller
According to.
In the prior art, keyboard and input method suffers from the drawback that if PS2 keyboard sends PS2 keyboard input data
To after 8042 controllers, before system keyboard drive takes the PS2 keyboard input data in controller away, keyboard filter is driven
8042 controller of trend sends Simulation of keyboard input data, and PS2 keyboard input data can be covered, be led by Simulation of keyboard input data
Cause the failure of PS2 keyboard input data;When the PS2 keyboard input data that PS2 keyboard is sent to controller includes two bytes,
After PS2 keyboard has sent first character section to controller, if keyboard filter drive to 8042 controllers send simulating keyboard it is defeated
Enter data, then the first character section of the PS2 keyboard input data of two bytes and second byte can be modeled keyboard input number
According to fractionation, keyboard filter driving the will acquire and corresponding keyboard input information of first character section and corresponding with second byte
Keyboard input information is separately transferred to upper layer application, and it is incorrect to eventually lead to the received PS2 keyboard input data of upper layer application.Mirror
In this, industry needs a kind of keyboard and input method that can be improved PS2 keyboard input data correctness.
Summary of the invention
The present invention provides a kind of method for improving input correctness to solve above-mentioned the technical problems existing in the prior art
It is driven with keyboard filter.
The present invention provides a kind of method for improving input correctness, comprising the following steps:
Step S1: keyboard filter driving obtains keyboard input data from system;
Step S2: the keyboard filter driving obtains current keyboard input information from the keyboard input data;
When the correction mark that the current keyboard input information is not interference information, and the keyboard filter drives itself to save
When not being default identification, step S3 is executed;
When the current keyboard input information is interference information, the correction mark that the keyboard filter drives itself to save is not
When being default identification, step S4 is executed;
When the current keyboard input information is interference information, the correction that the keyboard filter drives itself to save is identified as
When default identification, step S5 is executed;
When the keyboard filter drives and initializes, correction mark is set default mark by the keyboard filter driving
Know;
Step S3: the first marking keys in current keyboard input information are corrected in the keyboard filter driving, and correction is marked
Knowledge is updated to default identification, and the current keyboard input information after correction is saved in corresponding position in keyboard input data;
Step S4: the keyboard filter driving will remove in current keyboard input information data entered from the keyboard;
Step S5: the keyboard filter driving updates certainly according to the first marking keys in the current keyboard input information
The correction mark that body saves, and will be removed in current keyboard input information data entered from the keyboard;
After the keyboard filter driving has handled keyboard input information all in the keyboard input data, by keyboard
Input data returns to the system.
A kind of keyboard filter driving provided by the invention, comprising:
First obtains module, for obtaining keyboard input data from system;
Second obtains module, for obtaining current keyboard input information from the keyboard input data;
Preserving module, for saving correction mark;
Rectification module, the current keyboard input information for obtaining when the second acquisition module are not interference letter
Breath corrects the first key in current keyboard input information when the correction mark that the preserving module saves is not default identification
Mark;
First update module, for when the rectification module correct the first marking keys in current keyboard input information it
Afterwards, the correction mark that the preserving module saves is updated to default identification;
Memory module, for the current keyboard input information after rectification module correction to be saved in keyboard input data
Middle corresponding position;
First remove module, the current keyboard input information for obtaining module acquisition when described second are interference letter
Breath, when the correction mark that the preserving module saves is not default identification, by current keyboard input information data entered from the keyboard
Middle removal;
Second update module, the current keyboard input information for obtaining module acquisition when described second are interference letter
Breath is pressed when the correction that the preserving module saves is identified as default identification according to first in the current keyboard input information
Key mark updates the correction mark that the preserving module saves;
Second remove module, for being pressed when second update module according to first in the current keyboard input information
After key mark updates the correction mark that the preserving module saves, it will be moved in current keyboard input information data entered from the keyboard
It removes;
Setup module, for when the keyboard filter drives and initializes, the correction that the preserving module is saved to be identified
It is set as default identification;
Return module, the keyboard for having handled the first acquisition module acquisition when keyboard filter driving are defeated
After entering keyboard input information all in data, keyboard input data is returned into the system.
Compared with the prior art, the invention has the advantages that: keyboard filter driving obtains keyboard from system and inputs number
According to after obtaining current keyboard input information in data entered from the keyboard, keyboard filter driving is defeated according to the current keyboard of acquisition
Enter information and the correction itself saved is identified to current keyboard input information into processing, to improve the correctness of keyboard input.
Detailed description of the invention
Fig. 1 show a kind of method flow diagram for improving keyboard input correctness in the embodiment of the present invention 1;
Fig. 2 show a kind of method flow diagram for improving keyboard input correctness in the embodiment of the present invention 2;
Fig. 3 show a kind of method flow diagram for improving keyboard input correctness in the embodiment of the present invention 3;
Fig. 4 show a kind of module composition block diagram of keyboard filter driving in the embodiment of the present invention 4.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
Embodiment 1
The present embodiment provides a kind of methods of raising keyboard input correctness, as shown in Figure 1, comprising:
Step S1: keyboard filter driving obtains keyboard input data from system;
Step S2: keyboard filter drives in data entered from the keyboard and obtains current keyboard input information;
When the correction mark that keyboard filter drives itself to save is not default identification, current keyboard input information is not interference
When information, step S3 is executed;
When the correction mark that keyboard filter drives itself to save is not default identification, current keyboard input information is interference letter
When breath, step S4 is executed;
When the correction that keyboard filter drives itself to save is identified as default identification, current keyboard input information is interference information
When, execute step S5;
When keyboard filter drives and initializes, correction mark is set default identification by keyboard filter driving;
Step S3: the first marking keys in current keyboard input information are corrected in keyboard filter driving, more by correction mark
It is newly default identification, the current keyboard input information after correction is saved in corresponding position in keyboard input data;
Step S4: keyboard filter driving will remove in current keyboard input information data entered from the keyboard;
Step S5: keyboard filter driving updates itself preservation according to the first marking keys in current keyboard input information
Correction mark, and will be removed in current keyboard input information data entered from the keyboard;
After keyboard filter driving has handled keyboard input information all in keyboard input data, by keyboard input data
Return system.
In the present embodiment, in the above method, further includes:
Step N1: keyboard filter, which drives to controller transmission, forbids keyboard input instruction;
Step N2: keyboard filter drives to controller and sends Simulation of keyboard input data, by controller by simulating keyboard
Input data is transferred to system, is handled to obtain keyboard input information for Simulation of keyboard input data by system, and by key
Disk inputs information preservation into keyboard input data;
In step N2, keyboard filter is driven after controller transmission Simulation of keyboard input data, further includes: keyboard filter
Driving to send to controller allows keyboard to input instruction.
Optionally, before above-mentioned steps N1 further include: keyboard filter driving waits controller idle.
Optionally, keyboard filter drives after controller transmission Simulation of keyboard input data in above-mentioned steps N2, also wraps
Include: keyboard filter driving generates and saves information record;
When the current keyboard input information that keyboard filter driving obtains is interference information, have and current keyboard input information
Corresponding information record.
Optionally, in the present embodiment, in above-mentioned steps S1, further includes: keyboard filter driving calculates keyboard input data
The number of middle keyboard input information;
Correspondingly, before above-mentioned steps S2, further includes:
Step m1: keyboard filter driving judges whether cycle-index is less than the number of keyboard input information, is to execute step
Rapid S2, otherwise by keyboard input data return system;
After keyboard filter drives the current keyboard input information obtained in complete data entered from the keyboard per treatment, also wrap
It includes:
Step m2: cycle-index is added one by keyboard filter driving, return step m1;
When keyboard filter drives and initializes, cycle-index is set initial value by keyboard filter driving.
Specifically, the initial value of cycle-index is 0.
After above-mentioned keyboard filter drives the current keyboard input information obtained in complete data entered from the keyboard per treatment,
It further include step m2 after as above-mentioned steps S3- step S5.
Optionally, in the above method of the present embodiment, correction be identified as keyboard filter drive itself save second by
Key mark;Correspondingly, default identification is default marking keys;
The first marking keys in current keyboard input information are corrected in keyboard filter driving, and correction mark is updated to default
Mark, specifically: the in current keyboard input information is corrected in keyboard filter driving according to the second marking keys that itself is saved
One marking keys, and the second marking keys are updated to default marking keys.
Specifically, above-mentioned keyboard filter driving corrects current keyboard input information according to the second marking keys itself saved
In the first marking keys, specifically: keyboard filter driving the value of the second marking keys is added with the value of the first marking keys,
The first marking keys are updated using operation result;
Correspondingly, in the above method, keyboard filter is driven according to the first marking keys in current keyboard input information more
The new correction mark itself saved, specifically: keyboard filter drives the value of the first marking keys in current keyboard input information
Corresponding key-press status value is subtracted, updates the second marking keys using operation result.
Specifically, above-mentioned keyboard filter driving corrects current keyboard input information according to the second marking keys itself saved
In the first marking keys, specifically: keyboard filter driving carries out the value of the value of the second marking keys and the first marking keys
Position or operation update the first marking keys using operation result;
Correspondingly, in the above method, keyboard filter is driven according to the first marking keys in current keyboard input information more
The new correction mark itself saved, specifically: keyboard filter driving will key-press status value corresponding with current keyboard input information
It negates, the value for negating the first marking keys in result and current keyboard input information is subjected to position and operation, uses operation result
Update the second marking keys.
Specifically, above-mentioned keyboard filter driving corrects current keyboard input information according to the second marking keys itself saved
In the first marking keys, specifically: when the first marking keys value be keyboard filter drive itself save the first preset value
Or when the second preset value, keyboard filter driving is updated in current keyboard input information using the second marking keys that itself is saved
First marking keys;
Correspondingly, in the above method, keyboard filter is driven according to the first marking keys in current keyboard input information more
The new correction mark itself saved, specifically: when the first marking keys are not that keyboard filter drives itself save first to preset
Value or when the second preset value, or when the third marking keys during the value of the first marking keys is recorded with corresponding information value not
When equal, or when the value of the first marking keys key-press status value corresponding with current keyboard input information is unequal, keyboard
Filtration drive updates the second marking keys of itself preservation using the first marking keys.
For example, the first preset value is 0, the second preset value is 1.
Alternatively, above-mentioned keyboard filter driving is corrected in current keyboard input information according to the second marking keys itself saved
The first marking keys, specifically: when the value of the first marking keys key-press status value phase corresponding with current keyboard input information
Whens equal, keyboard filter driving updates the first key mark in current keyboard input information using the second marking keys that itself is saved
Know;
Correspondingly, in the above method, keyboard filter is driven according to the first marking keys in current keyboard input information more
The new correction mark itself saved, specifically: key-like is pressed when the value of the first marking keys is corresponding with current keyboard input information
When state value is unequal, or when the value and the value of the third marking keys in corresponding information record of the first marking keys are unequal
When, or when the value of first marking keys is not that the first preset value that the keyboard filter drives itself to save or second are pre-
If when value, keyboard filter driving updates the second marking keys of itself preservation using the first marking keys.
Optionally, in the above method of the present embodiment, above-mentioned keyboard filter driving is corrected in current keyboard input information
The first marking keys, will correction mark be updated to default identification, specifically: when the first marking keys value be keyboard filter drive
Value and current keyboard input information when moving the first preset value or the second preset value of itself preservation, or when the first marking keys
When corresponding key-press status value is equal, keyboard filter driving corrects current keyboard input letter according to the third preset value itself saved
The first marking keys in breath, and correction mark is updated to default identification;
Correspondingly, in the above method, keyboard filter is driven according to the first marking keys in current keyboard input information more
The new correction mark itself saved, specifically: when the third key mark during the value of the first marking keys is recorded with corresponding information
The value of knowledge is unequal, or when the value key-press status value corresponding with current keyboard input information of the first marking keys is unequal
When, or when the value of the first marking keys is not the first preset value or the second preset value that keyboard filter drives itself to save,
The correction mark itself saved is updated to preset non-default mark by keyboard filter driving.
Specifically, above-mentioned keyboard filter driving is corrected in current keyboard input information according to the third preset value itself saved
The first marking keys, specifically: keyboard filter driving by the value of the first marking keys and itself save third preset value into
Line position or operation update the first marking keys using operation result.
Specifically, above-mentioned keyboard filter driving is corrected in current keyboard input information according to the third preset value itself saved
The first marking keys, specifically: keyboard filter driving by the value of the first marking keys and itself save third preset value into
Row plus operation update the first marking keys using operation result.
Optionally, in the present embodiment above method, step S3- step S4, specifically:
Step a1: the correction that keyboard filter driving judges that itself is saved identifies whether as default identification;
When the correction that keyboard filter driving judges that itself is saved identifies not for default identification, step a2 is executed;
Step a2: the first marking keys in current keyboard input information are corrected in keyboard filter driving, more by correction mark
It is newly default identification;
Step a3: keyboard filter driving judges whether the current keyboard input information after correction is interference information, is to hold
Row step a4, otherwise executes a5;
Step a4: keyboard filter driving updates certainly according to the first marking keys in the current keyboard input information after correction
The correction mark that body saves, and will be removed in the current keyboard input information data entered from the keyboard after correction;
Step a5: the current keyboard input information after correction is saved in keyboard input data corresponding by keyboard filter driving
Position.
Optionally, in the above method, correction is identified as the second marking keys that keyboard filter drives itself to save, default mark
Know for default marking keys;
In above-mentioned steps a2, the first marking keys in current keyboard input information are corrected in keyboard filter driving, will be corrected
Mark is updated to default identification, specifically: keyboard filter driving corrects current keyboard according to the second marking keys itself saved
The first marking keys in information are inputted, and the second marking keys are updated to default marking keys.
Specifically, above-mentioned keyboard filter driving corrects current keyboard input information according to the second marking keys itself saved
In the first marking keys, specifically: keyboard filter driving the value of the second marking keys is added with the value of the first marking keys,
The first marking keys are updated using operation result;
Correspondingly, in above-mentioned steps a4, keyboard filter is driven according to first in the current keyboard input information after correction
Marking keys update the correction mark of itself preservation, specifically: keyboard filter drives the current keyboard input information after correction
In the values of the first marking keys subtract corresponding key-press status value, use operation result to update the second marking keys;
In above-mentioned steps S5, keyboard filter driving updates itself according to the first marking keys in current keyboard input information
The correction of preservation identifies, specifically: keyboard filter driving subtracts the value of the first marking keys in current keyboard input information pair
The key-press status value answered updates the second marking keys of itself preservation using operation result.
Specifically, above-mentioned keyboard filter driving corrects current keyboard input information according to the second marking keys itself saved
In the first marking keys, specifically: keyboard filter driving carries out the value of the value of the second marking keys and the first marking keys
Position or operation update the first marking keys using operation result;
Correspondingly, in above-mentioned steps a4, keyboard filter is driven according to first in the current keyboard input information after correction
Marking keys update the correction mark of itself preservation, specifically: keyboard filter drives the current keyboard input information after correction
Corresponding key-press status value negates, by negate result and correction after current keyboard input information in the first marking keys value into
Line position and operation update the second marking keys of itself preservation using operation result;
In above-mentioned steps S5, keyboard filter driving updates itself according to the first marking keys in current keyboard input information
The correction of preservation identifies, specifically: keyboard filter driving negates the corresponding key-press status value of current keyboard input information, will take
The value of the first marking keys carries out position and operation in converse result and current keyboard input information, updates itself using operation result and protects
The second marking keys deposited.
Specifically, above-mentioned keyboard filter driving corrects current keyboard input information according to the second marking keys itself saved
In the first marking keys, specifically: when the first marking keys value be keyboard filter drive itself save the first preset value
Or second preset value, or when the value of the first marking keys key-press status value corresponding with current keyboard input information is equal,
Keyboard filter driving updates the first marking keys in current keyboard input information using the second marking keys that itself is saved;
Correspondingly, in above-mentioned steps a4, keyboard filter is driven according to first in the current keyboard input information after correction
Marking keys update the correction mark of itself preservation, specifically: keyboard filter driving updates itself using the first marking keys and protects
The second marking keys deposited;
In above-mentioned steps S5, keyboard filter driving updates itself according to the first marking keys in current keyboard input information
The correction of preservation identifies, specifically: when the first marking keys are not the first preset value that keyboard filter drives itself to save or the
When two preset values, or when the value of the first marking keys key-press status value corresponding with current keyboard input information is unequal,
Or when the value of the first marking keys and the unequal value of the third marking keys in corresponding information record, keyboard filter is driven
Dynamic the second marking keys that itself preservation is updated using the first marking keys.
Optionally, in above-mentioned steps a2, the first marking keys in current keyboard input information are corrected in keyboard filter driving,
Correction mark is updated to default identification, specifically: when the value of the first marking keys is that keyboard filter drives the itself saved
When one preset value or the second preset value, or when the value key-press status corresponding with current keyboard input information of the first marking keys
When being worth equal, keyboard filter driving corrects the first key in current keyboard input information according to the third preset value that itself is saved
Mark, and correction mark is updated to default identification;
Correspondingly, in above-mentioned steps a4, keyboard filter is driven according to first in the current keyboard input information after correction
Marking keys update the correction mark of itself preservation, specifically: the correction mark itself saved is updated to by keyboard filter driving
Preset non-default mark;
In above-mentioned steps S5, keyboard filter driving updates itself according to the first marking keys in current keyboard input information
The correction of preservation identifies, specifically: when the value of the third marking keys during the value of the first marking keys is recorded with corresponding information
When unequal, or when the value of the first marking keys key-press status value corresponding with current keyboard input information is unequal, or
When the first preset value or the second preset value that the first marking keys are not that keyboard filter drives itself to save, keyboard filter drives person
The dynamic correction mark for saving itself is updated to preset non-default mark.
Specifically, above-mentioned keyboard filter driving is corrected in current keyboard input information according to the third preset value itself saved
The first marking keys, specifically: keyboard filter driving by the value of the first marking keys and itself save third preset value into
Line position or operation update the first marking keys using operation result.
Specifically, above-mentioned keyboard filter driving is corrected in current keyboard input information according to the third preset value itself saved
The first marking keys, specifically: keyboard filter driving by the value of the first marking keys and itself save third preset value into
Row plus operation update the first marking keys using operation result.
In the present embodiment, after above-mentioned steps S2, further includes:
When the correction that keyboard filter drives itself to save is identified as default identification, current keyboard input information is not interference letter
When breath, step S6 is executed;
Step S6: current keyboard input information is saved in corresponding position in keyboard input data by keyboard filter driving.
Compared with the prior art, the invention has the advantages that: keyboard filter driving obtains keyboard from system and inputs number
According to after obtaining current keyboard input information in data entered from the keyboard, keyboard filter driving is defeated according to the current keyboard of acquisition
Enter information and the correction itself saved mark to current keyboard input information into processing, improves the correctness of keyboard input;Key
Before disk filtration drive sends Simulation of keyboard input data to controller, waits controller idle, can so prevent analog key
Data cover in controller is guaranteed to drive in keyboard filter to controller transmission simulating keyboard in controller by disk input data
Data before input data are effective.
Embodiment 2
The present embodiment provides a kind of methods of raising keyboard input correctness, as shown in Figure 2, comprising the following steps:
Step S21: keyboard filter driving obtains keyboard input data from system, obtains in data entered from the keyboard current
Keyboard input information;
In the present embodiment, after PS2 keyboard sends PS2 keyboard input data to controller, system takes from controller
PS2 keyboard input data out, and processing is carried out to the PS2 keyboard input data of taking-up and generates keyboard input information, and by keyboard
Information preservation is inputted into keyboard input data.After keyboard filter, which drives, sends Simulation of keyboard input data to controller,
System takes out Simulation of keyboard input data from controller, and carries out processing to the Simulation of keyboard input data of taking-up and generate keyboard
Information is inputted, and keyboard input information is saved in keyboard input data.
Specifically, keyboard filter drives the current keyboard input information obtained in data entered from the keyboard to be specially
KEYBOARD_NIPUT_DATA structured data.
For example, KEYBOARD_NIPUT_DATA structured data is as follows:
USHORT UnitId;The corresponding position digital of // keyboard equipment
USHORT MakeCode;// key scan code, i.e. key value
USHORT Flags;// the first marking keys
Wherein, the corresponding Unitld value of PS2 keyboard is 0;It include non-expanding key and expand on PS2 keyboard, when non-
Flags=0 in the keyboard input information obtained after system processing when expand is pressed, when non-expanding key bounces at system
Flags=1 in the keyboard input information obtained after reason;In the keyboard input information obtained after system processing when expand is pressed
Flags=2, Flags=3 in obtained keyboard input information after system processing when expand bounces.
In the present embodiment, it is defeated inside the marking keys Flags in current keyboard input information current keyboard to be also recorded
Enter the corresponding key-press status value of information.
Specifically, the corresponding key-press status value of current keyboard input information is the first bit digital in the first marking keys
Value.For example, the value of the first marking keys is that (0 binary number is 00 to Flags=0, the first digit in current keyboard input information
The value of word be 0) or Flags=2 (2 binary number be 10, the value of the first bit digital for 0) when, corresponding key-press status value is
0;The value of the first marking keys is that (1 binary number is 01 to Flags=1, the value of the first bit digital in current keyboard input information
For 1) or Flags=3 (3 binary number is 11, and when the value of the first bit digital is 1), corresponding key-press status value is 1.
For example, obtaining keyboard input information after system is handled when the alphabetical a on PS2 keyboard is pressed, system will
Keyboard input information is saved in keyboard input data, and keyboard filter driving obtains keyboard input data from system, from keyboard
The corresponding current keyboard input information obtained in input data is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=0;
When the alphabetical a on PS2 keyboard is bounced, keyboard input information is obtained after system is handled, system is by keyboard
Information preservation is inputted into keyboard input data, keyboard filter driving obtains keyboard input data from system, entered from the keyboard
The corresponding current keyboard input information obtained in data is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=1;
Wherein, on PS2 keyboard the key scan code of letter a value are as follows: MakeCode=0x1e.
Step S22: keyboard filter driving judges whether current keyboard input information is interference information, is to then follow the steps
S25, it is no to then follow the steps S23;
Specifically, keyboard filter driving judges whether current keyboard input information is interference information, specifically: keyboard filter
Driving judges whether there is information corresponding with current keyboard input information record, is then for interference information, is not otherwise interference
Information.
Step S23: keyboard filter driving judges whether the second marking keys that itself is saved are default marking keys, are then
Current keyboard input information is saved in corresponding position in keyboard input data;It is no to then follow the steps S24.
For example, default marking keys value be 0, keyboard filter driving judge itself preservation the second marking keys whether be
Default marking keys, specially keyboard filter driving judges whether the value for the second marking keys that itself is saved is 0.
Step S24: keyboard filter driving is corrected in current keyboard input information according to the second marking keys itself saved
The first marking keys, by itself save the second marking keys be updated to default marking keys, by the current keyboard after correction
Input information preservation corresponding position into keyboard input data.
Step S25: keyboard filter driving judges whether the second marking keys that itself is saved are default marking keys, are then
Step S26 is executed, otherwise will be removed in current keyboard input information data entered from the keyboard.
For example, default marking keys value be 0, keyboard filter driving judge itself preservation the second marking keys whether be
Default marking keys, specially keyboard filter driving judges whether the value for the second marking keys that itself is saved is 0.
Step S26: keyboard filter driving updates itself according to the first marking keys in current keyboard input information and saves
The second marking keys, and will be removed in current keyboard input information data entered from the keyboard.
Optionally, in above-mentioned steps S24, keyboard filter driving corrects current key according to the second marking keys itself saved
Disk input information in the first marking keys, specifically: keyboard filter driving by itself save the second marking keys value with
The value of first marking keys is added, and updates the first marking keys using operation result;
For example, the value for the second marking keys that keyboard filter drives itself to save is 2, obtained in data entered from the keyboard
Current keyboard input information are as follows:
UnitId=0;
MakeCode=0x1e;
Flags=0;
I.e. the value of the first marking keys is 0, and the corresponding key-press status value of current keyboard input information is 0, and keyboard filter drives
It is dynamic to be added the value 2 of the second marking keys with the value 0 of the first marking keys, current keyboard input letter is updated using operation result 2
The first marking keys in breath, the value of the first marking keys is 2 after update, and the current keyboard input information after correction is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
The value of the first marking keys is 2 in current keyboard input information after correcting, and corresponding key-press status value is 0;
Correspondingly, in step S26, keyboard filter driving is updated according to the first marking keys in current keyboard input information
The second marking keys that itself is saved, specifically: the value of the first marking keys is subtracted current keyboard and inputted by keyboard filter driving
The corresponding key-press status value of information updates the second marking keys of itself preservation using operation result;
For example, the second marking keys that keyboard filter drives itself to save are default marking keys, marking keys are defaulted
Value 0, the current keyboard input information that keyboard filter driving obtains are as follows:
UnitId=0;
MakeCode=0x35;
Flags=3;
The value of the first marking keys is 3 in current keyboard input information, the corresponding key-press status of current keyboard input information
Value is 1, and the value 3 of the first marking keys is subtracted corresponding key-press status value 1 by keyboard filter driving, more using operation result 2
New the second marking keys itself saved, that is, the value of the second marking keys is 2 after updating.
Optionally, in above-mentioned steps S24, keyboard filter driving corrects current key according to the second marking keys itself saved
Disk inputs the first marking keys in information, specifically: keyboard filter drives the value of the second marking keys and the first key mark
The value of knowledge carries out position or operation, updates the first marking keys using operation result;
For example, the value for the second marking keys that keyboard filter drives itself to save is 2, the current keyboard input information of acquisition
Are as follows:
UnitId=0;
MakeCode=0x1e;
Flags=0;
I.e. the value of the first marking keys is 0, and the corresponding key-press status value of current keyboard input information is 0;Keyboard filter drives
It is dynamic the value 2 of second marking keys and the value 0 of the first marking keys to be subjected to position or operation (2 binary number is 00000010,0
Binary number be 00000000,00000010 and 00000000 carry out position or operation after obtain 00000010), using operation knot
Fruit 2 updates the first marking keys, and the current keyboard input information after correction is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
The value of the first marking keys is that 2 (corresponding binary number is in current keyboard input information after correcting
00000010);
Correspondingly, in above-mentioned steps S26, keyboard filter is driven according to the first marking keys in current keyboard input information
The second marking keys of itself preservation are updated, specifically: keyboard filter driving is corresponding by key-like by current keyboard input information
State value negates, and the value for negating the first marking keys in result and current keyboard input information is carried out position and operation, uses operation
As a result the second marking keys are updated.
For example, the value for the second marking keys that keyboard filter drives itself to save is default marking keys, key mark is defaulted
The value of knowledge is 0, and the current keyboard input information that keyboard filter driving obtains is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
The value of the first marking keys in current keyboard input information is 2, and current keyboard input information is corresponding to press key-like
State value is 0, and keyboard filter driving negates the corresponding key-press status value 00000000 of current keyboard input information, will negate result
The 11111111 progress position of value 00000010 and operation with the first marking keys in current keyboard input information uses operation result
00000010 updates the second marking keys, and the value of the second marking keys is 2 (2 binary system is 00000010) after update.
Optionally, after above-mentioned steps S23, before step S24, further includes:
Step h1: keyboard filter driving judges whether the first marking keys in current keyboard input information are that itself is saved
The first preset value or the second preset value, be to then follow the steps S24, otherwise by current keyboard input information be saved in keyboard input
Corresponding position in data;
Correspondingly, keyboard filter drives and corrects current key according to the second marking keys itself saved in above-mentioned steps S24
Disk inputs the first marking keys in information, specifically: when the first marking keys are the first preset value or the second preset value, key
Disk filtration drive updates the first marking keys in current keyboard input information using the second marking keys that itself is saved;
For example, the first preset value is 0, the second preset value is 1, the second marking keys that keyboard filter drives itself to save
Value is 2, and keyboard filter drives the current keyboard input information obtained from system are as follows:
UnitId=0;
MakeCode=0x1e;
Flags=0;
The value of the first marking keys in i.e. current keyboard input information is 0, and keyboard filter driving is saved using itself
Second marking keys update the first marking keys, and the value of the first marking keys is 2 after update, and the current keyboard after correction inputs letter
It ceases as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
Correspondingly, after above-mentioned steps S25, before step S26 further include:
Step h2: keyboard filter driving judges whether the value of the first marking keys in current keyboard input information is itself
The first preset value or the second preset value saved, is that will remove in current keyboard input information data entered from the keyboard, otherwise
Execute step S26.
In above-mentioned steps S26, keyboard filter driving updates certainly according to the first marking keys in current keyboard input information
The second marking keys that body saves, specifically: when the value of the first marking keys is not the first preset value or the second preset value, key
Disk filtration drive updates the second marking keys of itself preservation using the first marking keys;
For example, the first preset value is 0, the second preset value is 1, the second marking keys that keyboard filter drives itself to save
Value is 0, the current keyboard input information that keyboard filter driving obtains are as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
I.e. the value of the first marking keys is 2, and keyboard filter driving updates the second key mark using the value 2 of the first marking keys
Know, the value of the second marking keys is 2 after update.
Optionally, in the present embodiment, above-mentioned steps h1 can be with are as follows:
Step c1: keyboard filter driving judge the first marking keys in current keyboard input information whether with current keyboard
It is equal to input the corresponding key-press status value of information, is to then follow the steps S24, current keyboard input information is otherwise saved in keyboard
Corresponding position in input data.
Correspondingly, keyboard filter drives and corrects current key according to the second marking keys itself saved in above-mentioned steps S24
Disk inputs the first marking keys in information, specifically: when the first marking keys key corresponding with current keyboard input information
When state value is equal, keyboard filter driving updates the in current keyboard input information using the second marking keys that itself is saved
One marking keys.
Optionally, above-mentioned steps h2 can be with are as follows:
Step c2: keyboard filter driving judge the first marking keys in current keyboard input information value whether with currently
The corresponding key-press status value of keyboard input information is equal, is, will remove in current keyboard input information data entered from the keyboard,
It is no to then follow the steps S26.
Specifically, keyboard filter driving judge the first marking keys in current keyboard input information value whether with currently
The corresponding key-press status value of keyboard input information is equal, specifically: keyboard filter driving judge the first marking keys value whether
It is equal with the value of first the first bit digital of marking keys.
Correspondingly, in above-mentioned steps S26, keyboard filter is driven according to the first marking keys in current keyboard input information
The second marking keys of itself preservation are updated, specifically: the value of the first marking keys in current keyboard input information and current
When the corresponding key-press status value of keyboard input information is unequal, keyboard filter driving updates itself using the first marking keys and saves
The second marking keys.
Optionally, above-mentioned steps h2 can be with are as follows:
Step c3: keyboard filter driving judge the first marking keys in current keyboard input information value whether with it is corresponding
Information record in third marking keys value it is equal, be that will be moved in current keyboard input information data entered from the keyboard
It removes, it is no to then follow the steps S26.
Correspondingly, in above-mentioned steps S26, keyboard filter is driven according to the first marking keys in current keyboard input information
Update the second marking keys of itself preservation, specifically: the value of the first marking keys in current keyboard input information with it is corresponding
Information record in third marking keys value it is unequal when, keyboard filter driving using the first marking keys updates itself protect
The second marking keys deposited.
Optionally, in the above method of the present embodiment, further includes:
Step N1: keyboard filter, which drives to controller transmission, forbids keyboard input instruction;
In the present embodiment, after keyboard filter, which drives, forbids keyboard input instruction to controller transmission, PS2 keyboard cannot
It is enough that PS2 keyboard input data is sent into controller.
Specifically, keyboard filter, which is driven through port function WRITE_PORT_UCHAR and sends to controller, forbids keyboard defeated
Enter instruction.
For example, port function are as follows: WRITE_PORT_UCHAR (0x64,0xAD);Wherein, WRITE_PORT_UCHAR is end
Mouth function name, parameter 0x64 are control order port address, and parameter 0xAD is to forbid keyboard input instruction.
Step N2: keyboard filter drives to controller and sends Simulation of keyboard input data, by controller by simulating keyboard
Input data is transferred to system, is handled to obtain keyboard input information for Simulation of keyboard input data by system, and by key
Disk inputs information preservation into keyboard input data;
In step N2, keyboard filter is driven after controller transmission Simulation of keyboard input data, further includes: keyboard filter
Driving to send to controller allows keyboard to input instruction.
Specifically, keyboard filter, which drives to send to controller, allows keyboard to input instruction, specifically: keyboard filter driving is logical
Crossing port function WRITE_PORT_UCHAR and sending to controller allows keyboard to input instruction;
For example, port function is as follows: WRITE_PORT_UCHAR (0x64,0xae);Wherein, WRITE_PORT_UCHAR is
Port function title, parameter 0x64 are control order port address, and parameter 0xae is that keyboard is allowed to input instruction.
Optionally, before above-mentioned steps N1 further include: keyboard filter driving waits controller idle.
Specifically: keyboard filter is driven through operation port function WaitForKeyboardWriteCTL and waits controller
Command port 0x64 is idle.If control order port 0x64 is idle, keyboard filter drives port function out of service
WaitForKeyboardWriteCTL executes step N1;Otherwise port function is continued to run
WaitForKeyboardWriteCTL。
Specifically, keyboard filter is driven through operation port function WaitForKeyboardWriteCTL and waits controller
Command port 0x64 is idle, specifically includes:
Step L1: keyboard filter is driven through the state of operation port function Read Controller port;
For example, keyboard filter is driven through operation port function WaitForKeyboardWriteCTL Read Controller end
The state of mouth is READ_PORT_UCHAR (0x64), and 0x64 is controller end port address;
Step L2: keyboard filter driving judges whether director port is idle according to the state of director port, if it is
Then follow the steps N1;Otherwise return step L1;
Wherein, keyboard filter driving judges whether director port is idle according to the state of director port, specifically: key
Disk filtration drive judges whether minimum two data are removed in controller according to the state of director port, if it is empty
It is spare time, otherwise not idle;
For example, keyboard filter driving judges (whether 0x64) &0x3 is 0 to READ_PORT_UCHAR, if it is, controller
In minimum two be removed, controller is idle;Otherwise in controller minimum two be not removed, controller is not free
It is not busy.
In the present embodiment, keyboard filter drives to controller and sends Simulation of keyboard input data waiting controller sky before
Spare time is in order to avoid the PS2 keyboard input data in overlay controller.
Further, keyboard filter drives after controller transmission Simulation of keyboard input data, further includes: keyboard filter
Interference information event is opened in driving;
Correspondingly, before above-mentioned steps S22, further includes: keyboard filter drives it is determined whether to enable interference information event, is
S22 is thened follow the steps, it is no to then follow the steps S23;
In step S25, when keyboard filter driving judges that the marking keys that itself is saved are not default marking keys, also wrap
Include: interference information event is closed in keyboard filter driving;
In step S26 further include: close interference information event.
Optionally, keyboard filter drives after controller transmission Simulation of keyboard input data in above-mentioned steps N2, also wraps
Include: keyboard filter driving generates and saves information record;
It specifically, include key scan code and third marking keys in information record.
In above-mentioned steps S21, when the current keyboard input information that keyboard filter driving obtains is interference information, has and work as
The corresponding information record of preceding keyboard input information.
Correspondingly, keyboard filter driving judges whether keyboard input information is interference information in above-mentioned steps S22, specifically
Are as follows: keyboard filter driving judges whether that preserving information corresponding with current keyboard input information records, and being then is interference information,
It otherwise is not interference information;
Specifically, keyboard filter driving judges whether to preserve information record corresponding with current keyboard input information, tool
Body are as follows: during keyboard filter driving judges whether the value of the key scan code in current keyboard input information records with corresponding information
Key scan code value it is equal, be then have information corresponding with current keyboard input information record, otherwise not with it is current
The corresponding information record of keyboard input information.
Optionally, in above-mentioned steps S26, further includes: keyboard filter driving is removed corresponding with current keyboard input information
Information record;
In above-mentioned steps S25, when keyboard filter driving judges that the second marking keys that itself is saved are not default key marks
When knowledge, further includes: information record corresponding with current keyboard input information is removed in keyboard filter driving.
Optionally, in above-mentioned steps S21, keyboard filter driving after obtaining keyboard input data in system, from key
Before obtaining current keyboard input information in disk input data, further includes: keyboard filter driving calculates key in keyboard input data
The number of disk input information;
Correspondingly, keyboard filter drives before obtaining current keyboard input information in data entered from the keyboard, further includes:
Step m1: keyboard filter driving judges whether cycle-index is less than the number of keyboard input information, is then from keyboard
Current keyboard input information is obtained in input data, otherwise by keyboard input data return system;
After keyboard filter drives the current keyboard input information obtained in complete data entered from the keyboard per treatment, also wrap
It includes:
Step m2: cycle-index is added one by keyboard filter driving, return step m1;
When keyboard filter drives and initializes, cycle-index is set initial value by keyboard filter driving.For example, initial value
It is 0.
In the present embodiment, above-mentioned keyboard filter drives the current keyboard obtained in complete data entered from the keyboard per treatment defeated
Enter information and execute step m2 later, specifically: step m2 is executed after step S26, executes step m2, key after step S24
Disk filtration drive executes step m2 after removing in current keyboard input information data entered from the keyboard, keyboard filter driving will
Current keyboard input information, which is saved in keyboard input data, executes step m2 after corresponding position.
Specifically, above-mentioned keyboard filter driving calculates the number of keyboard input information in keyboard input data, specifically: key
Disk filtration drive uses the data length of keyboard input data divided by the data of keyboard input information single in keyboard input data
The positive integer that length obtains.
In the present embodiment, keyboard filter drives the keyboard input data obtained from system, and specifically upper layer application is sent
To system.Correspondingly, by after keyboard input data return system, system will be in keyboard input information for keyboard filter driving
Data return to corresponding upper layer application.
Optionally, in the present embodiment, above-mentioned keyboard filter driving judges whether current keyboard input information is interference information
With keyboard filter driving judge itself save the second marking keys whether be default marking keys sequence can exchange, that is, walk
Rapid S21- step S26 sequence can be step M1- step M6, and specific steps M1- step M6 is as follows:
Step M1: keyboard filter driving obtains keyboard input data from system, obtains in data entered from the keyboard current
Keyboard input information;
Step M2: keyboard filter driving judges whether the second marking keys that itself is saved are default marking keys, are then
Execute step M3;It is no to then follow the steps M5;
Step M3: keyboard filter driving judges whether current keyboard input information is interference information, is to then follow the steps M4,
Otherwise current keyboard input information is saved in corresponding position in keyboard input data;
Specifically, step M3 is identical as above-mentioned steps S22, and details are not described herein.
Step M4: keyboard filter driving updates itself preservation according to the first marking keys in current keyboard input information
Second marking keys, and will be removed in current keyboard input information data entered from the keyboard.
Specifically, step M4 is identical as above-mentioned steps S26, and details are not described herein.
Step M5: keyboard filter driving judges whether current keyboard input information is interference information, is then by current keyboard
It is removed in input information data entered from the keyboard, it is no to then follow the steps M6;
Specifically, step M5 is identical as above-mentioned steps S22, and details are not described herein.
Step M6: keyboard filter driving is corrected in current keyboard input information according to the second marking keys that itself is saved
The second marking keys that itself is saved are updated to default marking keys by the first marking keys, and the current keyboard after correction is defeated
Enter information preservation corresponding position into keyboard input data;
Specifically, step M6 is identical as above-mentioned steps S24, and details are not described herein.
Optionally, in the present embodiment, above-mentioned steps S22- step S26 can also be step a1- step a7:
Step a1: keyboard filter driving judges whether the second marking keys that itself is saved are default marking keys, are then
Step a6 is executed, it is no to then follow the steps a2;
Specifically, keyboard filter driving judges whether the second marking keys that itself is saved are default key mark in step a1
Knowledge is identical as above-mentioned steps S25 and step S23, and details are not described herein.
Step a2: keyboard filter driving is corrected in current keyboard input information according to the second marking keys that itself is saved
Second marking keys are updated to default marking keys by the first marking keys;
Step a3: keyboard filter driving judges whether the current keyboard input information after correction is interference information, is to hold
Row step a4, otherwise executes a5;
In step a3, keyboard filter driving judges whether the current keyboard input information after correction is interference information, with step
Keyboard filter driving judges whether current keyboard input information is that interference information is identical in rapid S22, and details are not described herein.
Step a4: keyboard filter driving updates certainly according to the first marking keys in the current keyboard input information after correction
The second marking keys that body saves, and will be removed in the current keyboard input information data entered from the keyboard after correction;
Step a5: the current keyboard input information after correction is saved in keyboard input data corresponding by keyboard filter driving
Position;
Step a6: keyboard filter driving judges whether current keyboard input information is interference information, is to then follow the steps a7,
Otherwise a8 is executed;
Keyboard filter driving judges whether current keyboard input information is interference information in step a6, with key in step S22
Disk filtration drive judges whether current keyboard input information is that interference information is identical, and details are not described herein.
Step a7: keyboard filter driving updates itself preservation according to the first marking keys in current keyboard input information
Second marking keys, and will be removed in current keyboard input information data entered from the keyboard;
Step a8: current keyboard input information is saved in corresponding position in keyboard input data by keyboard filter driving.
Optionally, in above-mentioned steps a2, keyboard filter driving corrects current key according to the second marking keys itself saved
Disk inputs the first marking keys in information, specifically: keyboard filter drives the value of the second marking keys and the first key mark
The value of knowledge is added, and updates the first marking keys using operation result;
For example, the value for the second marking keys that keyboard filter drives itself to save is 2, the keyboard input obtained from system
Information are as follows:
UnitId=0;
MakeCode=0x1e;
Flags=0;
I.e. the value of the first marking keys is 0, and corresponding key-press status value is 0, and keyboard filter drives the second marking keys
Value 2 be added with the value 0 of the first marking keys, the first key mark in current keyboard input information is updated using operation result
Know, the value of the first marking keys is 2 after update, and the keyboard input information after correction is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
The value of the first marking keys is 2 in current keyboard input information after correcting, and corresponding key-press status value is 0.
Correspondingly, in above-mentioned steps a4, keyboard filter is driven according to first in the current keyboard input information after correction
Marking keys update the second marking keys of itself preservation, specifically: keyboard filter driving inputs the current keyboard after correction
The value of the first marking keys subtracts corresponding key-press status value in information, and the second key of itself preservation is updated using operation result
Mark.
For example, keyboard filter driving subtracts the value 2 of the first marking keys in the current keyboard input information after correction pair
The key-press status value 0 answered updates the second marking keys itself saved using operation result 2, and after update, keyboard filter driving is certainly
The value for the second marking keys that body saves is 2.
In above-mentioned steps a7, keyboard filter driving updates itself according to the first marking keys in current keyboard input information
The second marking keys saved, specifically: keyboard filter driving subtracts the value of the first marking keys in current keyboard input information
Corresponding key-press status value is gone, updates the second marking keys using operation result.
For example, the second marking keys that keyboard filter drives itself to save are default marking keys, marking keys are defaulted
Value 0, the current keyboard input information that keyboard filter driving obtains are as follows:
UnitId=0;
MakeCode=0x35;
Flags=3;
The value of the first marking keys is 3 in current keyboard input information, and corresponding key-press status value is 1, and keyboard filter drives
It is dynamic that the value 3 of first marking keys is subtracted into corresponding key-press status value 1, second itself saved is updated using operation result 2
Marking keys, that is, the value of the second marking keys is 2 after updating.
Optionally, in step a2, keyboard filter driving is defeated according to the current keyboard of the second marking keys correction itself saved
Enter the first marking keys in information, specifically: keyboard filter drives the value of the second marking keys and the first marking keys
Value carries out position or operation, updates the first marking keys using operation result;
For example, the value for the second marking keys that keyboard filter drives itself to save is 2, the keyboard input obtained from system
Information are as follows:
UnitId=0;
MakeCode=0x1e;
Flags=0;
I.e. the value of the first marking keys is 0, and the corresponding key-press status value of keyboard input information is 0;Keyboard filter driving will
(2 binary number is the two of 00000011,0 for the value 2 of second marking keys and the progress position of value 0 of the first marking keys or operation
System number be 00000000,00000010 and 00000000 progress position or operation after obtain 00000010), using operation result 2
The first marking keys are updated, the keyboard input information after correction is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
The value of the first marking keys is that 2 (corresponding binary number is in keyboard input information after correcting
00000010);
Correspondingly, in step a4, keyboard filter is driven according to the first key in the current keyboard input information after correction
Mark updates the second marking keys that itself is saved, specifically: keyboard filter drives the current keyboard input information after correction
Corresponding key-press status value negates, by negate result and correction after current keyboard input information in the first marking keys value into
Line position and operation update the second marking keys using operation result;
For example, correction after current keyboard input information in the first marking keys value be 2, the current keyboard after correction
Inputting the corresponding key-press status value of information is 0, and keyboard filter drives the corresponding key of current keyboard input information after correction
State value 00000000 negates, by the first marking keys in the current keyboard input information after negating result 11111111 and correcting
Value 00000010 carry out position and operation, update the second marking keys, the second key after update using operation result 00000010
The value of mark is 2 (2 binary system is 00000010).
In step a7, keyboard filter driving updates itself according to the first marking keys in current keyboard input information and saves
The second marking keys, specifically: keyboard filter driving the corresponding key-press status value of current keyboard input information is negated, will take
The value of the first marking keys carries out position and operation in converse result and current keyboard input information, updates second using operation result and presses
Key mark.
For example, the current keyboard input information that keyboard filter driving obtains is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
The value of the first marking keys in current keyboard input information is 2, then corresponding with current keyboard input information to press
Key-like state value is 0, and keyboard filter driving negates the corresponding key-press status value 00000000 of current keyboard input information, will be negated
As a result the 11111111 progress position of value 00000010 and operation with the first marking keys in current keyboard input information, uses operation
As a result 00000010 updates the second marking keys, and the value of the second marking keys is 2 (2 binary system is 00000010) after update.
Optionally, before step a2, further includes:
Step W1: keyboard filter driving judges whether the value of the first marking keys in current keyboard input information is that itself is protected
The first preset value or the second preset value deposited, are to then follow the steps a2.
In step a2, keyboard filter driving is corrected in current keyboard input information according to the second marking keys itself saved
The first marking keys, specifically: when the value of the first marking keys be the first preset value or the second preset value when, keyboard filter drive
Dynamic the second marking keys saved using itself update the first marking keys in current keyboard input information;
For example, the first preset value is 0, the second preset value is 1, the second marking keys that keyboard filter drives itself to save
Value is 2, and keyboard filter drives the current keyboard input information obtained from system are as follows:
UnitId=0;
MakeCode=0x1e;
Flags=0;
The value of the first marking keys in i.e. current keyboard input information is 0, and keyboard filter driving is saved using itself
Second marking keys update the first marking keys, and the value of the first marking keys is 2 after update, and the current keyboard after correction inputs letter
It ceases as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
Correspondingly, in step a4, keyboard filter is driven according to the first key in the current keyboard input information after correction
Mark updates the second marking keys that itself is saved, specifically: keyboard filter driving uses the first marking keys after correction more
New the second marking keys itself saved;
For example, keyboard filter driving updates the second key itself saved using the value 2 of the first marking keys after correction
The value of mark, after update, the value of the second marking keys is 2.
Correspondingly, before step a7, further includes:
Step W2: keyboard filter driving judges whether the value of the first marking keys in current keyboard input information is that itself is protected
The first preset value or the second preset value deposited are will to remove in current keyboard input information data entered from the keyboard, otherwise hold
Row step a7.
In step a7, keyboard filter driving updates itself according to the first marking keys in current keyboard input information and saves
The second marking keys, specifically: when the first marking keys are not the first preset value or the second preset value, keyboard filter driving
The second marking keys of itself preservation are updated using the first marking keys.
For example, the first preset value is 0, the second preset value is 1, the second marking keys that keyboard filter drives itself to save
Value is 0, the keyboard input information obtained from system are as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
I.e. the value of the first marking keys is 2, and keyboard filter driving updates the second key mark using the value 2 of the first marking keys
Know, the value of the second marking keys is 2 after update.
Optionally, in above-mentioned steps W1, keyboard filter driving judges the first marking keys in current keyboard input information
When value is not the first preset value or the second preset value itself saved, current keyboard input information is saved in keyboard input data
Middle corresponding position.
Optionally, in above-mentioned steps W1, keyboard filter driving judges the first marking keys in current keyboard input information
When value is not the first preset value or the second preset value itself saved, is driven in keyboard filter and save current keyboard input information
Into keyboard input data before corresponding position, further includes: keyboard filter driving judges whether current keyboard input information is dry
Information is disturbed, is, will be removed in current keyboard input information data entered from the keyboard;Otherwise current keyboard input information is saved
The corresponding position into keyboard input data.
Optionally, above-mentioned steps W1 can be with are as follows:
Step R1: keyboard filter driving judge the first marking keys in current keyboard input information value whether with current key
The corresponding key-press status value of disk input information is equal, is to then follow the steps a2, it is defeated that keyboard input information is otherwise saved in keyboard
Enter corresponding position in data.
Correspondingly, in above-mentioned steps a2, keyboard filter driving corrects current key according to the second marking keys itself saved
Disk inputs the first marking keys in information, specifically: when the value of the first marking keys is corresponding with current keyboard input information
When key-press status value is equal, keyboard filter driving is updated in current keyboard input information using the second marking keys itself saved
The first marking keys.
Optionally, above-mentioned steps W2 can be with are as follows:
Step R2: keyboard filter driving judge the first marking keys in current keyboard input information value whether with current key
The corresponding key-press status value of disk input information is equal, is that will remove in current keyboard input information data entered from the keyboard, no
Then follow the steps a7.
Specifically, keyboard filter driving judge the first marking keys in current keyboard input information value whether with current key
The corresponding key-press status value of disk input information is equal, specifically: keyboard filter driving judges first in current keyboard input information
Whether the value of marking keys is equal with the value of first the first bit digital of marking keys in current keyboard input information, and being then will be current
It is removed in keyboard input information data entered from the keyboard, it is no to then follow the steps a7;
Correspondingly, in above-mentioned steps a7, keyboard filter is driven according to the first marking keys in current keyboard input information
The second marking keys of itself preservation are updated, specifically: when the value of the first marking keys is corresponding with current keyboard input information
When key-press status value is unequal, keyboard filter driving updates the second marking keys of itself preservation using the first marking keys.
Optionally, above-mentioned steps W2 can be with are as follows:
Step R3: keyboard filter driving judge the first marking keys in current keyboard input information value whether with it is corresponding
The value of third marking keys in information record is equal, is that will remove in current keyboard input information data entered from the keyboard,
It is no to then follow the steps a7.
Correspondingly, in above-mentioned steps a7, keyboard filter is driven according to the first marking keys in current keyboard input information
The second marking keys of itself preservation are updated, specifically: when the third during value and the corresponding information of the first marking keys record
When the value of marking keys is unequal, keyboard filter driving updates the second marking keys of itself preservation using the first marking keys.
It in embodiments of the present invention, include system key disk bottom layer driving, the driving of system keyboard type in system;PS2 keyboard to
The PS2 keyboard input data that controller is sent may be 1 byte, it is also possible to which two bytes, keyboard filter drive to control
The Simulation of keyboard input data that device is sent are usually a byte.Controller can only receive the data of a byte every time, work as PS2
When keyboard input data includes two bytes, the first character section that PS2 keyboard is sent to controller includes extra key mark, to
Second byte that controller is sent includes key scan code.
In the present embodiment, when the key on PS2 keyboard is pressed, PS2 keyboard sends corresponding PS2 keyboard to controller
Input data, system wherein obtained from control PS2 keyboard input data and to the processing method of PS2 keyboard input data such as
Under:
When the non-expanding key of PS2 keyboard is pressed, the PS2 keyboard input data that PS2 keyboard is sent to controller is 1
A byte, keyboard filter drive before taking out corresponding keyboard input information in system, and controller and system are defeated to PS2 keyboard
Enter the processing method of data the following steps are included:
Step A1:PS2 keyboard sends PS2 keyboard input data to controller;
Step A2: system key disk bottom layer driving takes out PS2 keyboard input data from controller, inputs number to PS2 keyboard
According to being handled to obtain keyboard input information;
For example, system key disk bottom layer driving handle to PS2 keyboard input data when PS2 keyboard presses alphabetical a
The keyboard input information arrived is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=0;
Step A3: system key try to get to the heart of a matter layer be driven through call back function by keyboard input information be sent to system keyboard type drive
It is dynamic;
Step A4: the driving of system keyboard type copies to keyboard input information in the keyboard input data in IRP.
IRP in the driving of system keyboard type comes from upper layer application.
Specifically, in the present invention, above-mentioned keyboard filter driving obtains keyboard input data from system, specifically: keyboard
Filtration drive obtains keyboard input data from the IRP in system key class dish driving.
When PS2 expanded keyboard key is pressed, the PS2 keyboard input data that PS2 keyboard is sent to controller is two
Byte, keyboard filter driving is before taking out keyboard input data in system, and controller and system are to PS2 keyboard input data
Processing method the following steps are included:
Step B1:PS2 keyboard sends the first character section of PS2 keyboard input data to controller;
Step B2: system key disk bottom layer driving takes out PS2 keyboard input data first character section from controller, and carries out
It saves.
Step B3:PS2 keyboard sends second byte of PS2 keyboard input data to controller;
Step B4: system key disk bottom layer driving takes out data from controller, and is handled, and generates keyboard input letter
Breath.
After step B2, before step B3, keyboard filter driving does not send Simulation of keyboard input data to controller
When, then the first character section of PS2 keyboard input data and second byte will not be split, step B4 system key disk bottom layer driving
The data taken out from controller are second byte of PS2 keyboard input data, and system key disk bottom layer driving can be to preservation PS2
The first character section of keyboard input data and received second byte are handled to obtain keyboard input information.
For example, system key disk bottom layer driving is to PS2 keyboard input data when PS2 keyboard presses alpha keypad "/"
Second byte and the first character section of preservation are handled, and obtained keyboard input information is as follows:
UnitId=0;
MakeCode=0x35;
Flags=2;
After step B2, before step B3, keyboard filter drive to controller send Simulation of keyboard input data when, then
The first character section of PS2 keyboard input data and second byte are split, and system key disk bottom layer driving is from control in step B4
The data taken out in device are Simulation of keyboard input data, and system key disk bottom layer driving can be to the first character section of preservation and received
Simulation of keyboard input data are handled, and keyboard input information is obtained, and keyboard filter drives defeated to controller transmission simulating keyboard
After entering data, keyboard filter driving can generate and save information record, include third marking keys and key in information record
Scan code.
For example, the value of key scan code is 0x1e in Simulation of keyboard input data, system key disk bottom layer driving is to analog key
Disk input data and the first character section of preservation are handled, and obtained keyboard input information is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
Keyboard filter drives after controller transmission Simulation of keyboard input data, generates and saves information record, information
The value of key scan code is 0x1e in record, and the value of third marking keys is 0, and keyboard filter driving gets corresponding current key
When disk inputs information, correction mark (the correction mark itself saved can be updated by the first marking keys Flags=2 based on the received
It is specifically as follows the second marking keys).
When system key disk bottom layer driving gets second byte of PS2 keyboard input data from controller, to second
A byte is handled, and when keyboard filter driving gets corresponding current keyboard input information, what is saved according to itself is rectified
Positive mark (correction mark is specifically as follows the second marking keys) corrects current keyboard input information.
For example, system key disk bottom layer driving handles second byte of PS2 keyboard input data, obtained keyboard
It is as follows to input information:
UnitId=0;
MakeCode=0x35;
Flags=0;
It, can be according to the correction mark pair itself saved after keyboard filter driving obtains corresponding current keyboard input information
The first marking keys Flags=0 in current keyboard input information is corrected.
Step B5: system key try to get to the heart of a matter layer be driven through call back function by keyboard input information be sent to system keyboard type drive
It is dynamic;
Step B6: keyboard input information is copied to the keyboard input data in IRP by the driving of system keyboard type.
In the present embodiment, the IRP of system keyboard type driving comes from upper layer application.
Specifically, above-mentioned keyboard filter driving obtains keyboard input data from system, specifically: keyboard filter driving from
Keyboard input data is obtained in the IRP of system key class dish driving.
In the present invention, keyboard filter driving meeting not timing sends Simulation of keyboard input information to controller, when keyboard mistake
When filter driving sends Simulation of keyboard input data to controller, taken out from system keyboard drive in keyboard filter driving corresponding
It is further comprising the steps of before keyboard input information:
Step D1: keyboard filter driving waits controller idle;
Specifically, step D1 drives with keyboard filter above-mentioned in the present embodiment waits the method for controller free time identical,
This is repeated no more.
Step D2: keyboard filter, which drives to controller transmission, forbids keyboard input instruction.
With specific reference to above-mentioned steps N1, details are not described herein.
Step D3: keyboard filter driving waits controller idle;
Identical as step D1, details are not described herein.
Step D4: when the controller is idle, keyboard filter drives to controller transmission and writes data command;
Specifically, command port 0x64 of the port function WRITE_PORT_UCHAR to controller is called in keyboard filter driving
Data command is write in transmission.
For example, port function are as follows: WRITE_PORT_UCHAR (0x64,0xd2).
Wherein, WRITE_PORT_UCHAR is port function title, and parameter 0x64 is control order port address, parameter
0xd2 is to write data command.
Step D5: keyboard filter driving waits the input buffer of controller idle.
Specifically, keyboard filter is driven through operation first port function judges whether director port is idle, is then defeated
Enter the buffer free time, otherwise input buffer is not idle:
For example, first port function is READ_PORT_UCHAR (0x64), wherein parameter 0x64 is for director port
Location;
Specifically, keyboard filter is driven through operation first port function judges whether director port is idle, specifically:
Keyboard filter is driven through operation first port function judges whether deputy data are removed in controller, if taking away
It is free time, otherwise not idle.
For example, keyboard filter driving judges (whether 0x64) &0x2 is 0 to READ_PORT_UCHAR, if it is, controller
Middle second data have been removed, and controller is idle;Otherwise second data are not removed in controller, and controller does not have
Free time continues to judge whether director port is idle.
Step D6: keyboard filter drives to controller and sends Simulation of keyboard input data, opens interference information event, generates
And save information record;
Step D7: system key disk bottom layer driving takes out Simulation of keyboard input data from controller, to Simulation of keyboard input
Data are handled to obtain keyboard input information.
When in system key disk bottom layer driving without saving extra key mark, obtained to after Simulation of keyboard input data processing
To keyboard input information in the first marking keys value be 0 or 1;
For example, obtained keyboard input information are as follows:
UnitId=0;
MakeCode=0x82;
Flags=1;
When saving extra key mark in system key disk bottom layer driving, to Simulation of keyboard input data and extra key mark
Knowing the first key target in the keyboard input information obtained after being handled is not 0 or 1;
For example, obtained keyboard input information are as follows:
UnitId=0;
MakeCode=0x82;
Flags=3;
Step D8: system key try to get to the heart of a matter layer be driven through call back function by keyboard input information be sent to system keyboard type drive
It is dynamic.
Step D9: the driving of system keyboard type copies to keyboard input information in the keyboard input data of IRP request.
In the present embodiment, the IRP in the driving of system keyboard type comes from upper layer application.
Specifically, in the present invention, above-mentioned keyboard filter driving obtains keyboard input information from system, specifically: keyboard
Filtration drive obtains keyboard input data from the IRP of system key class dish driving.
Compared with the prior art, the invention has the advantages that: when PS2 keyboard input data includes two bytes,
After PS2 keyboard has sent first character section to controller, if keyboard filter, which drives to controller, sends Simulation of keyboard input number
According to keyboard filter driving obtains corresponding keyboard input information, is saved according to the current keyboard input information of acquisition to itself
Second marking keys are updated, when keyboard filter driving gets key corresponding with second byte of PS2 keyboard input data
When disk inputs information, the current keyboard input information of acquisition is corrected using the second marking keys of preservation, thus effectively
It avoids second byte of PS2 keyboard input data and first character section from being modeled the fractionation of keyboard input data, guarantees that upper layer is answered
With the correctness of received PS2 keyboard input data;After controller receives PS2 keyboard input data, in system keyboard drive
Before PS2 keyboard input data in controller is taken away, keyboard filter driving can wait controller idle later again to control
Device sends Simulation of keyboard input data, can so prevent Simulation of keyboard input data from the PS2 keyboard in controller is inputted number
According to covering, guarantee that PS2 keyboard input data is effective.
Embodiment 3
The present embodiment provides a kind of methods of raising keyboard input correctness, as shown in Figure 3, comprising:
Step S31: keyboard filter driving obtains keyboard input data from system, obtains in data entered from the keyboard current
Keyboard input information.
The present embodiment step S31 is identical as step S21 in embodiment 2, and details are not described herein.
Step S32: keyboard, which is overdrived, judges whether current keyboard input information is interference information, is to then follow the steps S36;
It is no to then follow the steps S33.
Specifically, keyboard filter driving judges whether current keyboard input information is interference information, specifically: keyboard filter
Driving judges whether there is information corresponding with current keyboard input information record, is then for interference information, is not otherwise interference
Information.
Step S33: the correction that keyboard filter driving judges that itself is saved identifies whether as default identification, is then by current key
Disk inputs information preservation corresponding position into keyboard input data;It is no to then follow the steps S34.
For example, the value of default identification is 0, keyboard filter driving judges that the correction that itself is saved identifies whether as default mark
Know, specially keyboard filter driving judges whether the value of the correction mark itself saved is 0.
Step S34: keyboard filter driving judges whether the value of the first marking keys in current keyboard input information is itself
The first preset value or the second preset value saved, is to then follow the steps S35, current keyboard input information is otherwise saved in keyboard
Corresponding position in input data;
Preferably, in the present embodiment, the first preset value is 0, and the second preset value is 1.
Optionally, step S34 can be with are as follows: keyboard filter driving judges the first marking keys in current keyboard input information
Value key-press status value whether corresponding with current keyboard input information it is equal, be to then follow the steps S35, otherwise by current keyboard
Input information preservation corresponding position into keyboard input data.
Specifically, keyboard filter driving judge the first marking keys in current keyboard input information value whether with current key
It is equal that disk inputs the corresponding key-press status value of information, specifically: keyboard filter drive judge the first marking keys value whether with
The value of the first bit digital is equal in first marking keys, is to then follow the steps S35, is otherwise saved in current keyboard input information
Corresponding position in keyboard input data.
Step S35: keyboard filter driving is corrected in current keyboard input information according to the third preset value that itself is saved
First marking keys, and correction mark is updated to default identification.
Preferably, third preset value is 2.
Step S36: the correction that keyboard filter driving judges that itself is saved identifies whether as default identification, is to then follow the steps
S37;Otherwise it will be removed in current keyboard input information data entered from the keyboard.
For example, default identification is 0.
Step S37: keyboard filter driving judge the first marking keys in current keyboard input information value whether with it is corresponding
Information record in third marking keys value it is equal, be that will be moved in current keyboard input information data entered from the keyboard
It removes, it is no to then follow the steps S38.
Optionally, step S37 can be with are as follows: keyboard filter driving judges the first marking keys in current keyboard input information
Value key-press status value whether corresponding with current keyboard input information it is equal, be then that current keyboard input information is defeated from keyboard
Enter in data and removes, it is no to then follow the steps S38.
Specifically, keyboard filter driving judges whether the value of the first marking keys in current keyboard input information presses with first
The value of the first bit digital is equal in key mark, is that will remove in current keyboard input information data entered from the keyboard, otherwise hold
Row step S38.
Optionally, step S37 can be with are as follows: keyboard filter driving judges the first marking keys in current keyboard input information
Value whether with itself save the first preset value or the second preset value it is equal, be then that current keyboard input information is defeated from keyboard
Enter in data and removes, it is no to then follow the steps S38.
For example, the first preset value is 0, the second preset value is 1.
Step S38: the correction mark itself saved is updated to preset non-default mark by keyboard filter driving, will be current
It is removed in keyboard input information data entered from the keyboard.
Non-default 1 is identified as example, preset.
Optionally, in above-mentioned steps S35, keyboard filter driving corrects current keyboard according to the third preset value itself saved
Input the first marking keys in information, specifically: keyboard filter driving by the value of the first marking keys and itself save the
Three preset values carry out position or operation, update the first marking keys using operation result.
For example, the third preset value that keyboard filter drives itself to save is 2, the current key obtained from system keyboard drive
Disk inputs information are as follows:
UnitId=0;
MakeCode=0x1e;
Flags=0;
I.e. the value of the first marking keys is 0, and the corresponding key-press status value of keyboard input information is 0;
The value 0 of third preset value 2 and the first marking keys is carried out position or operation (2 binary number by keyboard filter driving
The binary number for being 00000011,0 obtains after carrying out position or operation with 00000000 for 00000000,00000010
00000010) the first marking keys, are updated using operation result 2, the current keyboard input information after correction is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
The value of the first marking keys is that 2 (corresponding binary number is in current keyboard input information after correcting
00000010)。
Optionally, in above-mentioned steps S35, keyboard filter driving corrects current keyboard according to the third preset value itself saved
Input the first marking keys in information, specifically: keyboard filter driving by the value of the first marking keys and itself save the
Three preset values carry out plus operation, update the first marking keys using operation result.
For example, third preset value is 2, the keyboard input information that keyboard filter driving obtains is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=0;
I.e. the value of the first marking keys is 0, the third that keyboard filter driving saves the value 0 of the first marking keys with itself
Preset value 2 carries out plus operation, updates the first marking keys using operation result 2, and the value of the first marking keys is 2 after update.It rectifys
Keyboard input information after just is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
The value of the first marking keys after correcting in current keyboard input information is 2.
Optionally, in the above method of the present embodiment, further includes:
Step N1: keyboard filter, which drives to controller transmission, forbids keyboard input instruction;
In the present embodiment, step N1 is identical as step N1 in embodiment 2, and details are not described herein.
Step N2: keyboard filter drives to controller and sends Simulation of keyboard input data, by controller by simulating keyboard
Input data is transferred to system, is handled to obtain keyboard input information for Simulation of keyboard input data by system, and by key
Disk inputs information preservation into keyboard input data;
In step N2, keyboard filter is driven after controller transmission Simulation of keyboard input data, further includes: keyboard filter
Driving to send to controller allows keyboard to input instruction.
Specifically, keyboard filter, which is driven through port function WRITE_PORT_UCHAR and sends to controller, allows keyboard defeated
Enter instruction;
For example, port function is as follows: WRITE_PORT_UCHAR (0x64,0xae);Wherein, WRITE_PORT_UCHAR is
Port function title, parameter 0x64 are control order port address, and parameter 0xae is that keyboard is allowed to input instruction.
Optionally, keyboard filter drives after controller transmission Simulation of keyboard input data in step N2, further includes: key
Disk filtration drive generates and saves information record;
It specifically, include key scan code and third marking keys in information record.
In above-mentioned steps S31, when the current keyboard input information that keyboard filter driving obtains is interference information, has and work as
The corresponding information record of preceding keyboard input information.
Correspondingly, keyboard filter driving judges whether keyboard input information is interference information in above-mentioned steps S32, specifically
Are as follows: keyboard filter driving judges whether that preserving information corresponding with current keyboard input information records, and being then is interference information,
It otherwise is not interference information;
Specifically, keyboard filter driving judges whether to preserve information record corresponding with current keyboard input information, tool
Body are as follows: during keyboard filter driving judges whether the value of the key scan code in current keyboard input information records with corresponding information
Key scan code value it is equal, be then have information corresponding with current keyboard input information record, otherwise not with it is current
The corresponding information record of keyboard input information.
In above-mentioned steps S38, further includes: information note corresponding with current keyboard input information is removed in keyboard filter driving
Record;
In above-mentioned steps S36, when keyboard filter driving judges that the correction itself saved mark is default identification, also wrap
Include: information record corresponding with current keyboard input information is removed in keyboard filter driving;
In above-mentioned steps S37, keyboard filter driving judge in current keyboard input information the value of the first marking keys with it is right
When the value for the third marking keys in information record answered is unequal, further includes: keyboard filter driving is removed defeated with current keyboard
Enter the corresponding information record of information.
Further, before step N1 further include: keyboard filter driving waits controller idle.
Keyboard filter driving waits controller idle in the present embodiment, to be controlled with keyboard filter driving etc. in embodiment 2
The method of device free time is identical, and details are not described herein.
In the present embodiment, keyboard filter drives to controller and sends Simulation of keyboard input data waiting controller sky before
Spare time is in order to avoid the PS2 keyboard input data in overlay controller.
Further, keyboard filter drives after controller transmission Simulation of keyboard input data, further includes: keyboard filter
Interference information event is opened in driving;
Correspondingly, before above-mentioned steps S32, further includes: keyboard filter drives it is determined whether to enable interference information event, is
S32 is thened follow the steps, it is no to then follow the steps S33;
In above-mentioned steps S36, when keyboard filter driving judges that the correction itself saved mark is not default identification, also wrap
Include: interference information event is closed in keyboard filter driving;
In above-mentioned steps S37, keyboard filter driving judge in current keyboard input information the value of the first marking keys with it is right
When the value for the third marking keys in information record answered is equal, further includes: interference information event is closed in keyboard filter driving;
In above-mentioned steps S38 further include: close interference information event.
Optionally, in the present embodiment, above-mentioned steps S32- step S38 can also be step a1- step a7:
Step a1: the correction that keyboard filter driving judges that itself is saved identifies whether as default identification, is to then follow the steps
A7, it is no to then follow the steps a2;
For example, the value of default identification is 0.
Specifically, in step a1 keyboard filter driving judge itself preservation correction identify whether for default identification with it is above-mentioned
Step S33 is identical with step S36.
Step a2: keyboard filter driving judges whether the value of the first marking keys in current keyboard input information is first pre-
If value or the second preset value, are to then follow the steps a3, it is right in keyboard input data to be otherwise saved in current keyboard input information
Answer position;
Preferably, in the present embodiment, the first preset value is 0, and the second preset value is 1.
Optionally, step a2 can be with are as follows: keyboard filter driving judges the first marking keys in current keyboard input information
Value key-press status value whether corresponding with current keyboard input information it is equal, be to then follow the steps a3, otherwise by current keyboard
Input information preservation corresponding position into keyboard input data.
Specifically, keyboard filter driving judge the first marking keys value whether with the first bit digital in the first marking keys
Value it is equal, be to then follow the steps a3;Otherwise current keyboard input information is saved in corresponding position in keyboard input data.
Optionally, it in the no branch in step a2, is driven in keyboard filter and current keyboard input information is saved in key
In disk input data before corresponding position, further includes: keyboard filter driving judges whether current keyboard input information is interference letter
Breath, is that will remove in current keyboard input information data entered from the keyboard;
Correspondingly, current keyboard input information is saved in corresponding position in keyboard input data by keyboard filter driving, is had
Body are as follows: when it is interference information that keyboard filter driving, which judges current keyboard input information not, keyboard filter is driven current keyboard
Input information preservation corresponding position into keyboard input data.
Step a3: the in current keyboard input information is corrected in keyboard filter driving according to the third preset value that itself is saved
One marking keys, and correction mark is updated to default identification.
Step a4: keyboard filter driving judges whether the current keyboard input information after correction is interference information, is to hold
Row step a5, otherwise executes a6;
In step a4, keyboard filter driving judges whether the current keyboard input information after correction is interference information, specifically
Judge whether current keyboard input information is that interference information is identical with keyboard filter driving in step S32, details are not described herein.
Step a5: the correction mark itself saved is updated to preset non-default mark by keyboard filter driving, and will be rectified
It is removed in current keyboard input information data entered from the keyboard after just;
For example, the value of preset non-default mark is 1.
Step a6: the current keyboard input information after correction is saved in keyboard input data corresponding by keyboard filter driving
Position;
Step a7: keyboard filter driving judges whether current keyboard input information is interference information, is to then follow the steps a8,
Otherwise current keyboard input information is saved in the corresponding position of keyboard input data;
Keyboard filter driving judges whether current keyboard input information is interference information in step a7, with above-mentioned steps S32
Middle keyboard filter driving judges whether current keyboard input information is that interference information is identical, and details are not described herein.
Step a8: keyboard filter driving judge the first marking keys in current keyboard input information value whether with it is corresponding
Information record in third marking keys value it is equal, be that will be moved in current keyboard input information data entered from the keyboard
It removes;It is no to then follow the steps a9.
Optionally, step a8 can be with are as follows: keyboard filter driving judges the first marking keys in current keyboard input information
Value key-press status value whether corresponding with current keyboard input information it is equal, be then that current keyboard input information is defeated from keyboard
Enter in data and removes;It is no to then follow the steps a9.
Specifically, keyboard filter driving judge the first marking keys value whether with the first bit digital in the first marking keys
Value it is equal, be that will be removed in current keyboard input information data entered from the keyboard;It is no to then follow the steps a9.
Optionally, step a8 can be with are as follows: keyboard filter driving judges the first marking keys in current keyboard input information
Value whether be itself save the first preset value or the second preset value, be then by current keyboard input information number entered from the keyboard
According to middle removal;It is no to then follow the steps a9.
For example, the first preset value is 0, the second preset value is 1.
Step a9: the correction mark itself saved is updated to preset non-default mark by keyboard filter driving, and will be worked as
It is removed in preceding keyboard input information data entered from the keyboard.
Preferably, the value of preset non-default mark is 1.
Optionally, in above-mentioned steps a3, keyboard filter driving corrects current keyboard according to the third preset value itself saved
Input the first marking keys in information, specifically: keyboard filter driving by the value of the first marking keys and itself save the
Three preset values carry out position or operation, update the first marking keys using operation result.
For example, the third preset value that keyboard filter drives itself to save is 2, the current key obtained from system keyboard drive
Disk inputs information are as follows:
UnitId=0;
MakeCode=0x1e;
Flags=0;
I.e. the value of the first marking keys is 0, and the corresponding key-press status value of keyboard input information is 0;
The value 0 of third preset value 2 and the first marking keys is carried out position or operation (2 binary number by keyboard filter driving
The binary number for being 00000011,0 obtains after carrying out position or operation with 00000000 for 00000000,00000010
00000010) the first marking keys, are updated using operation result 2, the current keyboard input information after correction is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
The value of the first marking keys is that 2 (corresponding binary number is in current keyboard input information after correcting
00000010)。
Optionally, in above-mentioned steps a3, keyboard filter driving corrects current keyboard according to the third preset value itself saved
Input the first marking keys in information, specifically: keyboard filter driving by the value of the first marking keys and itself save the
Three preset values carry out plus operation, update the first marking keys using operation result.
For example, third preset value is 2, the current keyboard input information that keyboard filter driving obtains is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=0;
I.e. the value of the first marking keys is 0, the third that keyboard filter driving saves the value 0 of the first marking keys with itself
Preset value 2 carries out plus operation, updates the first marking keys using operation result 2, and the value of the first marking keys is 2 after update.It rectifys
Keyboard input information after just is as follows:
UnitId=0;
MakeCode=0x1e;
Flags=2;
The value of the first marking keys after correcting in current keyboard input information is 2.
Optionally, in above-mentioned steps S31, keyboard filter driving after obtaining keyboard input data in system, from key
Before obtaining current keyboard input information in disk input data, further includes: keyboard filter driving calculates key in keyboard input data
The number of disk input information;
Correspondingly, keyboard filter drives before obtaining current keyboard input information in data entered from the keyboard, further includes:
Step m1: keyboard filter driving judges whether cycle-index is less than the number of keyboard input information, is then from keyboard
Current keyboard input information is obtained in input data, otherwise by keyboard input data return system;
After keyboard filter drives the current keyboard input information obtained in complete data entered from the keyboard per treatment, also wrap
It includes:
Step m2: cycle-index is added one by keyboard filter driving, return step m1;
When keyboard filter drives and initializes, cycle-index is set initial value by keyboard filter driving.For example, initial value
It is 0.
In the present embodiment, above-mentioned keyboard filter drives the current keyboard obtained in complete data entered from the keyboard per treatment defeated
Enter information and execute step m2 later, specifically: step m2 is executed after step S38, executes step m2, key after step S35
Disk filtration drive executes step m2 after removing in current keyboard input information data entered from the keyboard, keyboard filter driving will
Current keyboard input information, which is saved in keyboard input data, executes step m2 after corresponding position.
Specifically, above-mentioned keyboard filter driving calculates the number of keyboard input information in keyboard input data, specifically: key
Disk filtration drive uses the data length of keyboard input data divided by the data of keyboard input information single in keyboard input data
The positive integer that length obtains.
In the present embodiment, keyboard filter drives the keyboard input data obtained from system, and specifically upper layer application is sent
To system.Correspondingly, by after keyboard input data return system, system will be in keyboard input information for keyboard filter driving
Data return to corresponding upper layer application.
In the present embodiment, when the key on PS2 keyboard is pressed, PS2 keyboard sends corresponding PS2 keyboard to controller
Input data, system obtain PS2 keyboard input data from controller and refer to the processing method of PS2 keyboard input data
Step A1- step A4 and step B1- step B6 in embodiment 2, details are not described herein.
In the present invention, keyboard filter driving meeting not timing sends Simulation of keyboard input information to controller, when keyboard mistake
When filter driving sends Simulation of keyboard input data to controller, taken out from system keyboard drive in keyboard filter driving corresponding
Before keyboard input information, keyboard filter drives defeated to simulating keyboard to controller transmission Simulation of keyboard input data and system
Enter step D1- step D9 in the processing method reference implementation example 2 of data, details are not described herein.
Compared with the prior art, the invention has the advantages that: in the present invention, when PS2 keyboard input data includes two words
When section, after PS2 keyboard has sent first character section to controller, if keyboard filter, which drives to controller, sends simulating keyboard
Input data after keyboard filter driving gets corresponding current keyboard input information, the correction itself saved is identified and is updated
For preset non-default mark, keyboard corresponding with second byte of PS2 keyboard input data is got when keyboard filter drives
When inputting information, when judging that the correction itself saved mark is not default identification, corrected according to the third preset value itself saved
The first marking keys in current keyboard input information, to effectively avoid second byte and the of PS2 keyboard input data
One byte is modeled the fractionation of keyboard input data, guarantees the correctness of the received PS2 keyboard input data of upper layer application;Control
After device receives PS2 keyboard input data, before system keyboard drive takes the PS2 keyboard input data in controller away,
Keyboard filter driving sends Simulation of keyboard input data to controller again after controller can be waited idle, can so prevent mould
Quasi- keyboard input data covers the PS2 keyboard input data in controller, guarantees that PS2 keyboard input data is effective.
Embodiment 4
The present embodiment provides a kind of drivings of keyboard filter, are illustrated in figure 4 the module composition block diagram of keyboard filter driving, tool
Body includes:
First obtains module 101, for obtaining keyboard input data from system;
Second obtains module 102, for obtaining current keyboard input information in data entered from the keyboard;
Preserving module 103, for saving correction mark;
Rectification module 104, the current keyboard input information for obtaining the acquisition of module 102 when second is not interference information,
When the correction mark that preserving module 103 saves is not default identification, the first marking keys in current keyboard input information are corrected;
First update module 105, for correcting the first marking keys in current keyboard input information when rectification module 104
Later, the correction mark that preserving module 103 saves is updated to default identification;
Memory module 106 is saved in keyboard input number for the current keyboard input information after correcting rectification module 104
According to middle corresponding position;
First remove module 107, the current keyboard input information for obtaining the acquisition of module 102 when second are interference letter
Breath will be in current keyboard input information data entered from the keyboard when the correction mark that preserving module 103 saves is not default identification
It removes;
Second update module 108, the current keyboard input information for obtaining the acquisition of module 102 when second are interference letter
Breath, when the correction that preserving module 103 saves is identified as default identification, according to the first marking keys in current keyboard input information
Update the correction mark that preserving module 103 saves;
Second remove module 109, for when the second update module 108 is according to the first key in current keyboard input information
After mark updates the correction mark that preserving module 103 saves, it will be removed in current keyboard input information data entered from the keyboard;
Setup module 110, for when keyboard filter drives and initializes, the correction mark that preserving module 103 saves to be set
It is set to default identification;
Return module 111, for having handled the keyboard input data that the first acquisition module 101 obtains when keyboard filter driving
In after all keyboard input information, by keyboard input data return system.
Optionally, above-mentioned keyboard filter driving further includes that the first sending module, the second sending module and third send mould
Block,
First sending module, for forbidding keyboard input instruction to controller transmission;
Second sending module, for when the first sending module to controller transmission forbid keyboard input instruction after, to control
Device processed sends Simulation of keyboard input data, and Simulation of keyboard input data are transferred to system by controller, by system by mould
Quasi- keyboard input data is handled to obtain keyboard input information, and keyboard input information is saved in keyboard input data;
Third sending module is used for after the second sending module sends Simulation of keyboard input data to controller, to control
Device processed, which is sent, allows keyboard to input instruction.
Optionally, above-mentioned keyboard filter driving is including the first sending module, the second sending module and third sending module
On the basis of, it further include waiting module,
Module is waited, for waiting to be controlled before the first sending module forbids keyboard input instruction to controller transmission
Device is idle.
Optionally, above-mentioned keyboard filter driving is including the first sending module, the second sending module and third sending module
On the basis of, it further include generation module,
Generation module, for generating information after the second sending module sends Simulation of keyboard input data to controller
Record;
Correspondingly, above-mentioned preserving module 103 is also used to save the information record of generation module generation;
When the second current keyboard input information for obtaining the acquisition of module 102 is interference information, has and current keyboard inputs
The corresponding information record of information.
Optionally, above-mentioned keyboard filter driving, further includes computing module, counting module and first judgment module;
Preserving module 103 is also used to save cycle-index;
Setup module 110 is also used to the cycle-index for saving preserving module 103 when keyboard filter drives and initializes
It is set as initial value;
Computing module, for calculating of keyboard input information in the keyboard input data that the first acquisition module 101 obtains
Number;
First judgment module, for obtaining current keyboard input letter in the second acquisition information entered from the keyboard of module 102
Before breath, judge whether the cycle-index of the preservation of preserving module 103 is less than the keyboard input information that computing module is calculated
Number;
Correspondingly, above-mentioned return module 111, specifically for judging following for the preservation of preserving module 103 when first judgment module
When ring number is not less than the number of keyboard input information, by keyboard input data return system;
Second obtains module 102, specifically for judging that the cycle-index of the preservation of preserving module 103 is small when first judgment module
When the number of keyboard input information, current keyboard input information is obtained in data entered from the keyboard;
Counting module drives the current keyboard obtained in complete data entered from the keyboard per treatment to input for keyboard filter
After information, the cycle-index that preserving module 103 saves is added one;
First judgment module is also used to after the cycle-index that preserving module 103 saves is added one by counting module, judgement
Whether the cycle-index that preserving module 103 saves is less than the number of keyboard input information.
In the present embodiment, the correction that preserving module 103 saves in above-mentioned keyboard filter driving is identified as the second key mark
Know, default identification is default marking keys;
Rectification module 104 is not interference letter specifically for the current keyboard input information obtained when the second acquisition module 102
Breath, when the second marking keys that preserving module 103 saves are not default marking keys, according to the second of the preservation of preserving module 103
Marking keys correct the first marking keys in current keyboard input information;
First update module 105, specifically for the second key mark saved when rectification module 104 according to preserving module 103
After knowing the first marking keys corrected in current keyboard input information, the second marking keys that preserving module 103 is saved are more
New is default marking keys.
Specifically, above-mentioned rectification module 104 including operation submodule and updates submodule,
Operation submodule, the current keyboard input information for obtaining the acquisition of module 102 when second is not interference information, is protected
When the second marking keys that storing module 103 saves are not default marking keys, the second marking keys that preserving module 103 is saved
Value be added with the value of the first marking keys;
Submodule is updated, for using the operation result of operation submodule to update the first marking keys;
Correspondingly, above-mentioned second update module 108, it is defeated specifically for working as the current keyboard that the second acquisition module 102 obtains
Entering information is that interference information inputs current keyboard when the second marking keys that preserving module 103 saves are default marking keys
The value of the first marking keys subtracts corresponding key-press status value in information, updates what preserving module 103 saved using operation result
Second marking keys.
Specifically, above-mentioned rectification module 104 including operation submodule and updates submodule,
Operation submodule, the current keyboard input information for obtaining the acquisition of module 102 when second is not interference information, is protected
When the second marking keys that storing module 103 saves are not default marking keys, by the value of the second marking keys and the first key mark
The value of knowledge carries out position or operation;
Submodule is updated, for using the operation result of operation submodule to update the first marking keys;
Correspondingly, above-mentioned second update module 108, it is defeated specifically for working as the current keyboard that the second acquisition module 102 obtains
Entering information is that interference information will be defeated with current keyboard when the second marking keys that preserving module 103 saves are default marking keys
Enter the corresponding key-press status value of information to negate, the value for negating the first marking keys in result and current keyboard input information is carried out
Position and operation update the second marking keys that preserving module 103 saves using operation result.
Specifically, above-mentioned preserving module 103, is also used to save the first preset value and the second preset value;It is obtained for working as second
When the current keyboard input information that modulus block 102 obtains is interference information, information corresponding with current keyboard input information is saved
Record;
Correspondingly, above-mentioned rectification module 104, the current keyboard specifically for obtaining the acquisition of module 102 when second input letter
The second marking keys that breath is not interference information, preserving module 103 saves are not default marking keys, and when the first key mark
When the value of knowledge is the first preset value or the second preset value that preserving module 103 saves, pressed using second that preserving module 103 saves
Key mark updates the first marking keys in current keyboard input information;
Above-mentioned second update module 108, specifically for being when the current keyboard input information of the second acquisition acquisition of module 102
The second marking keys that interference information, preserving module 103 save are default marking keys, and work as the value of the first marking keys not
For preserving module 103 save the first preset value or the second preset value when, or when second obtain module 102 obtain current key
Disk input information is that the second marking keys that interference information, preserving module 103 save are default marking keys, and are pressed when first
When the value of key mark and the unequal value of the third marking keys in corresponding information record;Or when the second acquisition module
Obtain the current keyboard input information be interference information, the preserving module save the second marking keys be default key
Mark uses the and when the value of the first marking keys key-press status value corresponding with current keyboard input information is unequal
One marking keys update the second marking keys that preserving module 103 saves;
Alternatively, optionally,
Above-mentioned rectification module 104, the current keyboard input information specifically for obtaining the acquisition of module 102 when second is not dry
Disturb information, preserving module 103 save the second marking keys be not default marking keys, and when the first marking keys value with
When the corresponding key-press status value of current keyboard input information is equal, updated using the second marking keys that preserving module 103 saves
The first marking keys in current keyboard input information;
Correspondingly, above-mentioned second update module 108, it is defeated specifically for working as the current keyboard that the second acquisition module 102 obtains
It is default marking keys that enter information, which be the second marking keys that interference information, preserving module 103 save, and when the first key mark
When the value of knowledge key-press status value corresponding with current keyboard input information is unequal;Or obtained when the second acquisition module 102
Current keyboard input information is that the second marking keys that interference information, preserving module 103 save are default marking keys, and are worked as
When the value of the first marking keys and the unequal value of the third marking keys in corresponding information record;Or it obtains when described second
Modulus block obtain the current keyboard input information be interference information, the preserving module save the second marking keys be silent
Recognize marking keys, and when the value of first marking keys is not that the first preset value that the preserving module saves or second are pre-
If value is constantly, the second marking keys that preserving module 103 saves are updated using the first marking keys.
In the present embodiment, the preserving module 103 in the driving of above-mentioned keyboard filter is also used to save third preset value, the
One preset value and the second preset value;When current keyboard input information for obtaining the acquisition of module 102 when second is interference information,
Save information record corresponding with current keyboard input information;
Correspondingly, above-mentioned rectification module 104, the current keyboard specifically for obtaining the acquisition of module 102 when second input letter
The correction mark that breath is not interference information, preserving module 103 saves is not default identification, and when the value of the first marking keys is
When the first preset value or the second preset value that preserving module 103 saves, corrected according to the third preset value that preserving module 103 saves
The first marking keys in current keyboard input information;
Alternatively, rectification module 104, is not specifically for the current keyboard input information obtained when the second acquisition module 102
The correction mark that interference information, preserving module 103 save is not default identification, and when the value of the first marking keys and current key
When the corresponding key-press status value of disk input information is equal, current keyboard is corrected according to the third preset value that preserving module 103 saves
Input the first marking keys in information;
First update module 105, specifically for the third preset value saved when rectification module 104 according to preserving module 103
After correcting the first marking keys in current keyboard input information, the correction mark that preserving module 103 saves is updated to write from memory
Recognize mark;
Second update module 108, the current keyboard input information specifically for obtaining the acquisition of module 102 when second are interference
The correction that information, preserving module 103 save is identified as default identification, and when the value and preserving module 103 of the first marking keys
When the value of third marking keys in the information record of preservation is unequal, the correction mark that preserving module 103 saves is updated to
Preset non-default mark;
Alternatively, the second update module 108, specifically for obtaining the current keyboard input information of the acquisition of module 102 when second
It is identified as default identification for the correction that interference information, preserving module 103 save, and when the value of the first marking keys and current key
When the corresponding key-press status value of disk input information is unequal, the correction mark that preserving module 103 saves is updated to preset non-
Default identification;
Alternatively, the second update module 108, specifically for obtaining the current keyboard input information of the acquisition of module 102 when second
It is identified as default identification for the correction that interference information, preserving module 103 save, and when the value of the first marking keys is not preservation
When the first preset value or the second preset value that module 103 saves, the correction mark that preserving module 103 saves is updated to preset
Non-default mark.
Specifically, above-mentioned rectification module 104 including operation submodule and updates submodule,
Operation submodule, the current keyboard input information for obtaining when the second acquisition module 102 are not interference information, protect
The correction mark that storing module 103 saves is not default identification, and when the value of the first marking keys is the first preset value or second
When preset value, the third preset value that the value of the first marking keys and preserving module 103 are saved carries out position or operation;
Alternatively, operation submodule, the current keyboard input information for being obtained when the second acquisition module be not interference information,
The correction mark that preserving module saves is not default identification, and when the value of the first marking keys and current keyboard input information pair
When the key-press status value answered is equal, the third preset value that the value of the first marking keys and preserving module save is subjected to position or fortune
It calculates;
Submodule is updated, for using the operation result of operation submodule to update the first marking keys.
Specifically, above-mentioned rectification module 104 including operation submodule and updates submodule,
Operation submodule, the current keyboard input information for obtaining when the second acquisition module 102 are not interference information, protect
The correction mark that storing module 103 saves is not default identification, and when the value of the first marking keys is the first preset value or second
When preset value, the third preset value that the value of the first marking keys and preserving module 103 save is carried out to add operation;
Alternatively, operation submodule, the current keyboard input information for being obtained when the second acquisition module be not interference information,
The correction mark that preserving module saves is not default identification, and when the value of the first marking keys and current keyboard input information pair
When the key-press status value answered is equal, carry out the third preset value that the value of the first marking keys and preserving module save to add operation;
Submodule is updated, for using the operation result of operation submodule to update the first marking keys.
In the present embodiment, above-mentioned keyboard filter driving further includes that the second judgment module, third judgment module and third update
Module;
Second judgment module obtains current keyboard input letter for working as in the second acquisition data entered from the keyboard of module 102
After breath, the correction for judging that preserving module 103 saves is identified whether as default identification;
Correspondingly, rectification module 104, specifically for judging the correction mark that preserving module 103 saves when the second judgment module
When knowledge is not default identification, the first marking keys in current keyboard input information are corrected;
First update module 105, specifically for judging that the correction that preserving module 103 saves identifies not when the second judgment module
It is default identification, after rectification module 104 corrects the first marking keys in current keyboard input information, by preserving module 103
The correction mark of preservation is updated to default identification;
Third judgment module, for judging whether the current keyboard input information after rectification module 104 is corrected is interference letter
Breath;
Third update module, for current keyboard input letter after third judgment module judges that rectification module 104 is corrected
When breath is interference information, the first marking keys in current keyboard input information after being corrected according to rectification module 104, which update, to be protected
The correction mark that storing module 103 saves;
Second remove module 109, the current keyboard being also used to after third update module is corrected according to rectification module 104 are defeated
After entering the correction mark that the first marking keys in information update the preservation of preserving module 103, after rectification module 104 is corrected
It is removed in current keyboard input information data entered from the keyboard;
Memory module 106 is inputted specifically for current keyboard after third judgment module judges that rectification module 104 is corrected
When information is not interference information, the current keyboard input information after rectification module 104 is corrected is saved in keyboard input data
Corresponding position.
Optionally, the correction that above-mentioned preserving module 103 saves is identified as the second marking keys, and default identification is default key
Mark;
Correspondingly, above-mentioned rectification module 104, specifically for judge the of the preservation of preserving module 103 when the second judgment module
When two marking keys are not default marking keys, it is defeated that current keyboard is corrected according to the second marking keys that preserving module 103 saves
Enter the first marking keys in information;
First update module 105, specifically for the second key mark saved when rectification module 104 according to preserving module 103
After knowing the first marking keys corrected in current keyboard input information, the second marking keys that preserving module 103 is saved are more
New is default marking keys.
Specifically, above-mentioned rectification module 104 includes operation submodule and update submodule;
Operation submodule, the second marking keys for judging that preserving module 103 saves when the second judgment module are not silent
When recognizing marking keys, the value for the second marking keys that preserving module 103 saves is added with the value of the first marking keys;
Submodule is updated, for using the operation result of operation submodule to update the first marking keys;
Above-mentioned third update module, specifically for current key after third judgment module judges that rectification module 104 is corrected
When disk input information is interference information, the first marking keys in the current keyboard input information after rectification module 104 is corrected
Value subtracts corresponding key-press status value, updates the second marking keys that preserving module 103 saves using operation result;
Second update module 108, the current keyboard input information specifically for obtaining the acquisition of module 102 when second are interference
Information is pressed when the second marking keys that preserving module 103 saves are default marking keys by current keyboard input information first
The value of key mark subtracts corresponding key-press status value, updates the second marking keys that preserving module 103 saves using operation result.
Specifically, above-mentioned rectification module 104 includes operation submodule and update submodule;
Operation submodule, the second marking keys for judging that preserving module 103 saves when the second judgment module are not silent
When recognizing marking keys, the value for the second marking keys that preserving module 103 is saved and the value of the first marking keys carry out position or fortune
It calculates;
Submodule is updated, for using the operation result of operation submodule to update the first marking keys;
Correspondingly, above-mentioned third update module, specifically for when third judgment module judge rectification module 104 correct after
When current keyboard input information is interference information, the corresponding key-press status value of current keyboard input information after correction is negated,
The value of first marking keys in current keyboard input information after negating result and correcting is subjected to position and operation, uses operation knot
Fruit updates the second marking keys that preserving module 103 saves;
Second update module 108, the current keyboard input information specifically for obtaining the acquisition of module 102 when second are interference
Information is pressed when the second marking keys that preserving module 103 saves are default marking keys by current keyboard input information is corresponding
Key-like state value negates, and the value for negating the first marking keys in result and current keyboard input information is carried out position and operation, is used
Operation result updates the second marking keys that preserving module 103 saves.
Specifically, above-mentioned preserving module 103, is also used to save the first preset value and the second preset value;It is obtained for working as second
When the current keyboard input information that modulus block 102 obtains is interference information, information corresponding with current keyboard input information is saved
Record;
Correspondingly, above-mentioned rectification module 104, specifically for judge the of the preservation of preserving module 103 when the second judgment module
Two marking keys be not default marking keys, and the value of the first marking keys be the first preset value or the second preset value when, make
The first marking keys in current keyboard input information are updated with the second marking keys that preserving module 103 saves;
Alternatively, above-mentioned rectification module 104, specifically for judging second that preserving module 103 saves when the second judgment module
Marking keys are not default marking keys, and press key-like when the value of the first marking keys is corresponding with current keyboard input information
When state value is equal, the first key in current keyboard input information is updated using the second marking keys that preserving module 103 saves
Mark;
Correspondingly, above-mentioned third update module, specifically for when third judgment module judge rectification module 104 correct after
When current keyboard input information is interference information, the first marking keys after being corrected using rectification module 104 update preserving module
103 the second marking keys saved;
Second update module 108, the current keyboard input information specifically for obtaining the acquisition of module 102 when second are interference
Information, the second marking keys that preserving module 103 saves are default marking keys, and when the first marking keys are not first pre-
If when value or the second preset value, updating the second marking keys that preserving module 103 saves using the first marking keys;
Alternatively, the second update module 108, specifically for obtaining the current keyboard input information of the acquisition of module 102 when second
For interference information, the second marking keys that preserving module 103 saves are default marking keys, and when the value of the first marking keys
When corresponding with current keyboard input information key-press status value is unequal, uses the first marking keys to update preserving module 103 and protect
The second marking keys deposited;
Alternatively, the second update module 108, specifically for obtaining the current keyboard input information of the acquisition of module 102 when second
For interference information, the second marking keys that preserving module 103 saves are default marking keys, and when the value of the first marking keys
When the value of third marking keys in recording with corresponding information is unequal, the first marking keys is used to update preserving module 103
The second marking keys saved.
Optionally, above-mentioned preserving module 103 is also used to save third preset value, the first preset value and the second preset value;With
When obtaining the current keyboard input information of the acquisition of module 102 when second is interference information, save and current keyboard input information
Corresponding information record;
Correspondingly, above-mentioned rectification module 104, specifically for judging that preserving module 103 saves strong when the second judgment module
Positive mark is not default identification, and when the value of the first marking keys is the first preset value or the second preset value, according to preservation
The third preset value that module 103 saves corrects the first marking keys in current keyboard input information;
Alternatively, rectification module 104, specifically for judging that the correction that preserving module 103 saves identifies when the second judgment module
It is not default identification, and when the value of the first marking keys key-press status value corresponding with current keyboard input information is equal,
The first marking keys in current keyboard input information are corrected according to the third preset value that preserving module 103 saves;
First update module 105, specifically for the third preset value saved when rectification module 104 according to preserving module 103
After correcting the first marking keys in current keyboard input information, the correction mark that preserving module 103 saves is updated to write from memory
Recognize mark;
Third update module, it is defeated specifically for current keyboard after third judgment module judges that rectification module 104 is corrected
When to enter information be interference information, correction mark is updated to preset non-default mark;
Second update module 108, the current keyboard input information specifically for obtaining the acquisition of module 102 when second are interference
Information, preserving module 103 save the second marking keys be default marking keys, and when the first marking keys value with it is corresponding
Information record in third marking keys value it is unequal when, correction that preserving module 103 saves mark is updated to preset
Non-default mark;
Alternatively, the second update module 108, specifically for obtaining the current keyboard input information of the acquisition of module 102 when second
For interference information, the second marking keys that preserving module 103 saves are default marking keys, and when the value of the first marking keys
When corresponding with current keyboard input information key-press status value is unequal, the correction mark that preserving module 103 saves is updated to
Preset non-default mark;
Alternatively, the second update module 108, specifically for obtaining the current keyboard input information of the acquisition of module 102 when second
For interference information, the second marking keys that preserving module 103 saves are default marking keys, and when the first marking keys are not
When the first preset value or the second preset value, the correction mark that preserving module 103 saves is updated to preset non-default mark.
Specifically, above-mentioned rectification module 104 includes operation submodule and update submodule;
Operation submodule, for judging that the correction mark that preserving module 103 saves is not default mark when the second judgment module
When knowledge, and when the value of the first marking keys is the first preset value or the second preset value, by the value of the first marking keys and guarantor
The third preset value that storing module 103 saves carries out position or operation;
Alternatively, operation submodule, the correction mark for judging that preserving module saves when the second judgment module is not default
Mark, and when the value of the first marking keys key-press status value corresponding with current keyboard input information is equal, first is pressed
The third preset value that the value and preserving module of key mark save carries out position or operation;
Submodule is updated, for using the operation result of operation submodule to update the first marking keys.
Specifically, above-mentioned rectification module 104 includes operation submodule and update submodule;
Operation submodule, for judging that the correction mark that preserving module 103 saves is not default mark when the second judgment module
When knowledge, and when the value of the first marking keys is the first preset value or the second preset value, by the value of the first marking keys and guarantor
The third preset value that storing module 103 saves carries out plus operation;
Alternatively, operation submodule, the correction mark for judging that preserving module saves when the second judgment module is not default
Mark, and when the value of the first marking keys key-press status value corresponding with current keyboard input information is equal, first is pressed
The third preset value that the value and preserving module of key mark save carries out plus operation;
Submodule is updated, for using the operation result of operation submodule to update the first key mark.
Optionally, the memory module 106 in above-mentioned keyboard filter driving is also used to obtain what module 102 obtained when second
Current keyboard input information is not interference information, and when the correction that saves of preserving module 103 is identified as default identification, by second
It obtains the current keyboard input information that module 102 obtains and is saved in corresponding position in keyboard input data.
More than, only a specific embodiment of the invention, but scope of protection of the present invention is not limited thereto, and it is any to be familiar with
Those skilled in the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all cover
Within protection scope of the present invention.
Claims (42)
1. a kind of method for improving keyboard input correctness, which comprises the following steps:
Step S1: keyboard filter driving obtains keyboard input data from system;
Step S2: the keyboard filter driving obtains current keyboard input information from the keyboard input data;
When the current keyboard input information is not interference information, the correction that the keyboard filter drives itself to save, which identifies, is not
When default identification, step S3 is executed;
When the current keyboard input information is interference information, the correction mark that the keyboard filter drives itself to save is not silent
When recognizing mark, step S4 is executed;
When the current keyboard input information is interference information, the correction that the keyboard filter drives itself to save is identified as default
When mark, step S5 is executed;
When the keyboard filter drives and initializes, correction mark is set default identification by the keyboard filter driving;
Step S3: the first marking keys in current keyboard input information are corrected in the keyboard filter driving, more by correction mark
It is newly default identification, the current keyboard input information after correction is saved in corresponding position in keyboard input data;
Step S4: the keyboard filter driving will remove in current keyboard input information data entered from the keyboard;
Step S5: the keyboard filter driving updates itself according to the first marking keys in the current keyboard input information and protects
The correction mark deposited, and will be removed in current keyboard input information data entered from the keyboard;
After the keyboard filter driving has handled keyboard input information all in the keyboard input data, keyboard is inputted
Data return to the system.
2. the method according to claim 1, wherein before step s1 further include:
Step N1: the keyboard filter, which drives to controller transmission, forbids keyboard input instruction;
Step N2: the keyboard filter drives to the controller and sends Simulation of keyboard input data, will by the controller
The Simulation of keyboard input data are transferred to system, are handled to obtain by the Simulation of keyboard input data by the system
Keyboard input information, and keyboard input information is saved in keyboard input data;
In step N2, the keyboard filter is driven after controller transmission Simulation of keyboard input data, further includes: described
Keyboard filter, which drives to send to the controller, allows keyboard to input instruction.
3. according to the method described in claim 2, it is characterized in that, before the step N1 further include: the keyboard filter
Driving waits the controller idle.
4. according to the method described in claim 2, it is characterized in that, keyboard filter described in the step N2 drives to the control
Device processed is sent after Simulation of keyboard input data, further includes: the keyboard filter driving generates and saves information record;
When the current keyboard input information that the keyboard filter driving obtains is interference information, has and inputted with the current keyboard
The corresponding information record of information.
5. the method according to claim 1, wherein in the step S1, further includes: the keyboard filter drives
The dynamic number for calculating keyboard input information in the keyboard input data;
Before the step S2, further includes:
Step m1: the keyboard filter driving judges whether cycle-index is less than the number of the keyboard input information, is to hold
The row step S2, otherwise by keyboard input data return system;
After the keyboard filter drives the current keyboard input information obtained in complete data entered from the keyboard per treatment, also wrap
It includes:
Step m2: the cycle-index is added one by the keyboard filter driving, returns to the step m1;
When keyboard filter drives and initializes, the cycle-index is set initial value by the keyboard filter driving.
6. the method according to claim 1, wherein the correction, which is identified as the keyboard filter, drives itself guarantor
The second marking keys deposited, the default identification are default marking keys;
The first marking keys in current keyboard input information are corrected in the keyboard filter driving, and correction mark is updated to default
Mark, specifically: the keyboard filter driving is corrected in current keyboard input information according to the second marking keys itself saved
The first marking keys, and by the second marking keys be updated to default marking keys.
7. according to the method described in claim 6, it is characterized in that, keyboard filter driving is pressed according to second that itself is saved
Key mark corrects the first marking keys in current keyboard input information, specifically: the keyboard filter drives the second key
The value of mark is added with the value of the first marking keys, updates the first marking keys using operation result;
The keyboard filter driving updates the correction mark of itself preservation according to the first marking keys in current keyboard input information
Know, specifically: it is defeated that the value of the first marking keys in current keyboard input information is subtracted current keyboard by keyboard filter driving
Enter the corresponding key-press status value of information, updates the second marking keys using operation result.
8. according to the method described in claim 6, it is characterized in that, keyboard filter driving is pressed according to second that itself is saved
Key mark corrects the first marking keys in current keyboard input information, specifically: the keyboard filter drives the second key
The value of mark and the value of the first marking keys carry out position or operation, update the first marking keys using operation result;
The keyboard filter driving updates the correction mark of itself preservation according to the first marking keys in current keyboard input information
Know, specifically: the keyboard filter driving negates key-press status value corresponding with current keyboard input information, will negate result
Position and operation are carried out with the value of the first marking keys in current keyboard input information, updates the second key mark using operation result
Know.
9. according to the method described in claim 6, it is characterized in that,
The keyboard filter driving is corrected first in current keyboard input information according to the second marking keys that itself is saved and is pressed
Key mark, specifically: when first marking keys value be the keyboard filter drive itself save the first preset value or
When the second preset value, the keyboard filter driving is updated in current keyboard input information using the second marking keys itself saved
The first marking keys;
The keyboard filter driving updates the correction mark of itself preservation according to the first marking keys in current keyboard input information
Know, specifically: when the value of first marking keys is not the first preset value that the keyboard filter drives itself to save or the
When two preset values, or when the value and the value of the third marking keys in corresponding information record of the first marking keys are unequal
When, or when the value of the first marking keys key-press status value corresponding with current keyboard input information is unequal, the keyboard
Filtration drive updates the second marking keys of itself preservation using the first marking keys;
Alternatively, the in current keyboard input information is corrected in keyboard filter driving according to the second marking keys that itself is saved
One marking keys, specifically: when the value of the first marking keys key-press status value corresponding with current keyboard input information is equal,
The keyboard filter driving updates the first key mark in current keyboard input information using the second marking keys that itself is saved
Know;
The keyboard filter driving updates the correction mark of itself preservation according to the first marking keys in current keyboard input information
Know, specifically: when the value of the first marking keys key-press status value corresponding with current keyboard input information is unequal, or work as
When the value of the first marking keys and the unequal value of the third marking keys in corresponding information record, or press when described first
When the value of key mark is not the first preset value or the second preset value that the keyboard filter drives itself to save, the keyboard filter
Driving updates the second marking keys of itself preservation using the first marking keys.
10. the method according to claim 1, wherein
The first marking keys in current keyboard input information are corrected in the keyboard filter driving, and correction mark is updated to default
Mark, specifically: when the value of first marking keys is the first preset value or that the keyboard filter drives itself to save
When two preset values, or when the value of the first marking keys key-press status value corresponding with current keyboard input information is equal, institute
Stating keyboard filter drives the third preset value saved according to itself to correct the first marking keys in current keyboard input information, and
Correction mark is updated to default identification;
The keyboard filter driving updates the correction mark of itself preservation according to the first marking keys in current keyboard input information
Know, specifically: when the value of the first marking keys and the unequal value of the third marking keys in corresponding information record, or
It is pressed when the value of the first marking keys key-press status value corresponding with current keyboard input information is unequal, or when described first
When the value of key mark is not the first preset value or the second preset value that the keyboard filter drives itself to save, the keyboard filter
The correction mark itself saved is updated to preset non-default mark by driving.
11. according to the method described in claim 10, it is characterized in that, the third that keyboard filter driving is saved according to itself
Preset value corrects the first marking keys in current keyboard input information, specifically: the keyboard filter drives the first key
The value of mark and the third preset value itself saved carry out position or operation, update the first marking keys using operation result.
12. according to the method described in claim 10, it is characterized in that, the third that keyboard filter driving is saved according to itself
Preset value corrects the first marking keys in current keyboard input information, specifically: the keyboard filter drives the first key
The value of mark and the third preset value itself saved carry out adding operation, and operation result is used to update the first marking keys.
13. the method according to claim 1, wherein the step S3, specifically:
Step a1: the correction that the keyboard filter driving judges that itself is saved identifies whether as default identification;
When the correction that keyboard filter driving judges that itself is saved identifies not for default identification, step a2 is executed;
Step a2: the first marking keys in current keyboard input information are corrected in the keyboard filter driving, more by correction mark
It is newly default identification;
Step a3: the keyboard filter driving judges whether the current keyboard input information after correction is interference information;
When current keyboard input information after the keyboard filter drives judgement correction is not interference information, step a4 is executed;
Step a4: the current keyboard input information after correction is saved in keyboard input data corresponding by the keyboard filter driving
Position.
14. according to the method for claim 13, which is characterized in that the correction is identified as the keyboard filter and drives itself
The second marking keys saved, the default identification are default marking keys;
The first marking keys in current keyboard input information are corrected in the keyboard filter driving, and correction mark is updated to default
Mark, specifically: the keyboard filter driving is corrected in current keyboard input information according to the second marking keys itself saved
The first marking keys, and by the second marking keys be updated to default marking keys.
15. according to the method for claim 14, which is characterized in that the keyboard filter driving is according to the second of itself preservation
Marking keys correct the first marking keys in current keyboard input information, specifically: the keyboard filter driving is pressed second
The value of key mark is added with the value of the first marking keys, updates the first marking keys using operation result;
The keyboard filter driving updates the correction mark of itself preservation according to the first marking keys in current keyboard input information
Know, specifically: the value of the first marking keys in current keyboard input information is subtracted corresponding key by the keyboard filter driving
State value updates the second marking keys of itself preservation using operation result.
16. according to the method for claim 14, which is characterized in that the keyboard filter driving is according to the second of itself preservation
Marking keys correct the first marking keys in current keyboard input information, specifically: the keyboard filter driving is pressed second
The value of key mark and the value of the first marking keys carry out position or operation, update the first marking keys using operation result;
The keyboard filter driving updates the correction mark of itself preservation according to the first marking keys in current keyboard input information
Know, specifically: keyboard filter driving negates the corresponding key-press status value of current keyboard input information, will negate result with
The value of the first marking keys carries out position and operation in current keyboard input information, updates the second of itself preservation using operation result
Marking keys.
17. according to the method for claim 14, which is characterized in that
The keyboard filter driving is corrected first in current keyboard input information according to the second marking keys that itself is saved and is pressed
Key mark, specifically: when first marking keys value be the keyboard filter drive itself save the first preset value or
Second preset value, or when the value of the first marking keys key-press status value corresponding with current keyboard input information is equal, institute
Stating keyboard filter driving uses the second marking keys of itself preservation to update the first marking keys in current keyboard input information;
The keyboard filter driving updates the correction mark of itself preservation according to the first marking keys in current keyboard input information
Know, specifically: when first marking keys are not that the first preset value that the keyboard filter drives itself to save or second are pre-
If value, perhaps when the value of the first marking keys key-press status value corresponding with current keyboard input information is unequal or
When the value of the first marking keys and the unequal value of the third marking keys in corresponding information record, the keyboard filter is driven
Dynamic the second marking keys that itself preservation is updated using the first marking keys.
18. according to the method for claim 13, which is characterized in that
The first marking keys in current keyboard input information are corrected in the keyboard filter driving, and correction mark is updated to default
Mark, specifically: when the value of first marking keys is the first preset value or that the keyboard filter drives itself to save
When two preset values, or when the value of the first marking keys key-press status value corresponding with current keyboard input information is equal, institute
Stating keyboard filter drives the third preset value saved according to itself to correct the first marking keys in current keyboard input information, and
Correction mark is updated to default identification;
The keyboard filter driving updates itself according to the first marking keys in the current keyboard input information after correction and saves
Correction mark, specifically: the correction mark itself saved is updated to preset non-default mark by keyboard filter driving;
The keyboard filter driving updates the correction mark of itself preservation according to the first marking keys in current keyboard input information
Know, specifically: when the value of the first marking keys and the unequal value of the third marking keys in corresponding information record, or
When the value of the first marking keys key-press status value corresponding with current keyboard input information is unequal, or work as first key
When mark does not drive the first preset value or the second preset value of itself preservation for the keyboard filter, the keyboard filter driving will
The correction mark itself saved is updated to preset non-default mark.
19. according to the method for claim 18, which is characterized in that the third that the keyboard filter driving is saved according to itself
Preset value corrects the first marking keys in current keyboard input information, specifically: the keyboard filter drives the first key
The value of mark and the third preset value itself saved carry out position or operation, update the first marking keys using operation result.
20. according to the method for claim 18, which is characterized in that the third that the keyboard filter driving is saved according to itself
Preset value corrects the first marking keys in current keyboard input information, specifically: the keyboard filter drives the first key
The value of mark and the third preset value itself saved carry out adding operation, and operation result is used to update the first marking keys.
21. the method according to claim 1, wherein after the step S2, further includes:
When the current keyboard input information is not interference information, and the correction mark that the keyboard filter drives itself to save
When for default identification, step S6 is executed;
Step S6: current keyboard input information is saved in corresponding position in keyboard input data by the keyboard filter driving.
22. a kind of keyboard filter driving characterized by comprising
First obtains module, for obtaining keyboard input data from system;
Second obtains module, for obtaining current keyboard input information from the keyboard input data;
Preserving module, for saving correction mark;
Rectification module, the current keyboard input information for obtaining module acquisition when described second is not interference information, institute
When the correction mark for stating preserving module preservation is not default identification, the first marking keys in current keyboard input information are corrected;
First update module, after for correcting the first marking keys in current keyboard input information when the rectification module,
The correction mark that the preserving module saves is updated to default identification;
Memory module is right in keyboard input data for the current keyboard input information after rectification module correction to be saved in
Answer position;
First remove module, the current keyboard input information for obtaining module acquisition when described second are interference information,
When the correction mark that the preserving module saves is not default identification, it will be moved in current keyboard input information data entered from the keyboard
It removes;
Second update module, the current keyboard input information for obtaining module acquisition when described second are interference information,
When the correction that the preserving module saves is identified as default identification, according to the first key mark in the current keyboard input information
Know and updates the correction mark that the preserving module saves;
Second remove module, for when second update module is according to the first key mark in the current keyboard input information
Know after updating the correction mark that the preserving module saves, will be removed in current keyboard input information data entered from the keyboard;
Setup module, the correction mark setting for when the keyboard filter drives and initializes, the preserving module to be saved
For default identification;
Return module, for obtaining the keyboard input number that module obtains when keyboard filter driving has handled described first
In after all keyboard input informations, keyboard input data is returned into the system.
23. keyboard filter driving according to claim 22, which is characterized in that further include the first sending module, the second hair
Module and third sending module are sent,
First sending module, for forbidding keyboard input instruction to controller transmission;
Second sending module, for when first sending module to controller transmission forbid keyboard input instruction after,
Simulation of keyboard input data are sent to the controller, the Simulation of keyboard input data are transferred to by the controller are
The Simulation of keyboard input data are handled to obtain keyboard input information by the system, and keyboard are inputted and is believed by system
Breath is saved in keyboard input data;
The third sending module, for when second sending module to the controller send Simulation of keyboard input data it
Afterwards, Xiang Suoshu controller, which is sent, allows keyboard to input instruction.
24. keyboard filter driving according to claim 23, which is characterized in that it further include waiting module,
The waiting module, for first sending module to the controller transmission forbid keyboard input instruction before,
Wait the controller idle.
25. keyboard filter driving according to claim 23, which is characterized in that it further include generation module,
The generation module is used for after second sending module sends Simulation of keyboard input data to the controller,
Generate information record;
The preserving module is also used to save the information record that the generation module generates;
When the described second current keyboard input information for obtaining module acquisition is interference information, has and the current keyboard inputs
The corresponding information record of information.
26. keyboard filter according to claim 22 driving, which is characterized in that further include computing module, counting module and
First judgment module;
The preserving module is also used to save cycle-index;
The setup module, be also used to the keyboard filter drive initialize when, by the preserving module save described in follow
Ring number is set as initial value;
The computing module obtains keyboard input information in the keyboard input data that module obtains for calculating described first
Number;
The first judgment module, for obtaining current keyboard input letter in the second acquisition module information entered from the keyboard
Before breath, judge whether the cycle-index that the preserving module saves is less than the keyboard input letter that the computing module is calculated
The number of breath;
The return module, specifically for judging that the cycle-index of the preserving module preservation is not small when the first judgment module
When the number of the keyboard input information, by keyboard input data return system;
Described second obtains module, specifically for judging the cycle-index that the preserving module saves when the first judgment module
Less than the keyboard input information number when, obtain current keyboard input information in data entered from the keyboard;
The counting module drives the current keyboard obtained in complete data entered from the keyboard per treatment for the keyboard filter
It inputs after information, the cycle-index that the preserving module saves is added one;
The first judgment module, be also used to the counting module by the cycle-index that the preserving module saves add one it
Afterwards, judge whether the cycle-index of the preserving module preservation is less than the number of the keyboard input information.
27. keyboard filter driving according to claim 22, which is characterized in that
The correction that the preserving module saves is identified as the second marking keys, and the default identification is default marking keys;
The rectification module, the current keyboard input information specifically for obtaining module acquisition when described second is not interference
Information saves when the second marking keys that the preserving module saves are not default marking keys according to the preserving module
Second marking keys correct the first marking keys in current keyboard input information;
First update module, specifically for the second marking keys saved when the rectification module according to the preserving module
After correcting the first marking keys in current keyboard input information, the second marking keys that the preserving module is saved update
To default marking keys.
28. keyboard filter driving according to claim 27, which is characterized in that the rectification module includes operation submodule
With update submodule,
The operation submodule, the current keyboard input information for obtaining when the second acquisition module are not interference letter
Breath, when the second marking keys that the preserving module saves are not default marking keys, the preserving module is saved second
The value of marking keys is added with the value of the first marking keys;
The update submodule, for using the operation result of the operation submodule to update the first marking keys;
Second update module, the current keyboard input information specifically for obtaining module acquisition when described second is dry
Information is disturbed, when the second marking keys that the preserving module saves are default marking keys, by current keyboard input information the
The value of one marking keys subtracts corresponding key-press status value, updates the second key that the preserving module saves using operation result
Mark.
29. keyboard filter driving according to claim 27, which is characterized in that the rectification module includes operation submodule
With update submodule,
The operation submodule, the current keyboard input information for obtaining when the second acquisition module are not interference letter
Breath, when the second marking keys that the preserving module saves are not default marking keys, by the value of the second marking keys and first
The value of marking keys carries out position or operation;
The update submodule, for using the operation result of the operation submodule to update the first marking keys;
Second update module, the current keyboard input information specifically for obtaining module acquisition when described second is dry
Disturbing information will be with current keyboard input information pair when the second marking keys that the preserving module saves are default marking keys
The key-press status value answered negates, and the value for negating the first marking keys in result and current keyboard input information is carried out position and fortune
It calculates, updates the second marking keys that the preserving module saves using operation result.
30. keyboard filter driving according to claim 27, which is characterized in that
The preserving module is also used to save the first preset value and the second preset value;For being obtained when the second acquisition module
Current keyboard input information when being interference information, save corresponding with current keyboard input information information and record;
The rectification module, the current keyboard input information specifically for obtaining module acquisition when described second is not interference
The second marking keys that information, the preserving module save are not default marking keys, and when first marking keys
When value is the first preset value or the second preset value that the preserving module saves, the second key for being saved using the preserving module
Mark updates the first marking keys in current keyboard input information;
Second update module, the current keyboard input information specifically for obtaining module acquisition when described second is dry
Disturb information, the second marking keys that the preserving module saves are default marking keys, and work as first marking keys
When value is not the first preset value or the second preset value that the preserving module saves;Or obtained when the second acquisition module
The current keyboard input information be interference information, the preserving module save the second marking keys be default marking keys,
And when the value of the first marking keys and the unequal value of the third marking keys in corresponding information record;Or when described
Second obtains the second key mark that the current keyboard input information that module obtains is interference information, preserving module preservation
Know for default marking keys, and when value key-press status value corresponding with the current keyboard input information not phase of the first marking keys
Whens equal, the second marking keys that the preserving module saves are updated using the first marking keys;
Alternatively,
The rectification module, the current keyboard input information specifically for obtaining module acquisition when described second is not interference
Information, the preserving module save the second marking keys be not default marking keys, and when the first marking keys value with
When the corresponding key-press status value of current keyboard input information is equal, updated using the second marking keys that the preserving module saves
The first marking keys in current keyboard input information;
Second update module, the current keyboard input information specifically for obtaining module acquisition when described second is dry
Disturb information, the preserving module save the second marking keys for default marking keys, and when the first marking keys value with
When the corresponding key-press status value of current keyboard input information is unequal;Or when described second obtain module obtain it is described current
Keyboard input information is that the second marking keys that interference information, the preserving module save are default marking keys, and when the
When the value of one marking keys and the unequal value of the third marking keys in corresponding information record;Or when second acquisition
Module obtain the current keyboard input information be interference information, the preserving module save the second marking keys be default
Marking keys, and when the value of first marking keys is not that the first preset value that the preserving module saves or second are default
Value constantly, using the first marking keys updates the second marking keys that the preserving module saves.
31. keyboard filter driving according to claim 22, which is characterized in that
The preserving module is also used to save third preset value, the first preset value and the second preset value;It is obtained for working as described second
When the current keyboard input information that modulus block obtains is interference information, information note corresponding with current keyboard input information is saved
Record;
The rectification module, the current keyboard input information specifically for obtaining module acquisition when described second is not interference
The correction mark that information, the preserving module save is not default identification, and when the value of first marking keys is described
When the first preset value or the second preset value that preserving module saves, rectified according to the third preset value that the preserving module saves
The first marking keys in proper preceding keyboard input information;
Alternatively, the rectification module, specifically for obtaining the current keyboard input information of module acquisition when described second not
For interference information, the preserving module save correction mark be not default identification, and when the first marking keys value with work as
When the corresponding key-press status value of preceding keyboard input information is equal, corrected according to the third preset value that the preserving module saves
The first marking keys in current keyboard input information;
First update module, specifically for being preset when the rectification module according to the third that the preserving module saves
After value corrects the first marking keys in current keyboard input information, the correction mark that the preserving module saves is updated to
Default identification;
Second update module, the current keyboard input information specifically for obtaining module acquisition when described second is dry
Disturb information, the correction of preserving module preservation is identified as default identification, and works as the value and the preservation of the first marking keys
When the value for the third marking keys in information record that module saves is unequal, correction mark that the preserving module is saved
Knowledge is updated to preset non-default mark;
Alternatively, second update module, specifically for obtaining the current keyboard input letter of module acquisition when described second
Breath is that the correction that interference information, the preserving module save is identified as default identification, and when the value of the first marking keys with work as
When the corresponding key-press status value of preceding keyboard input information is unequal, the correction mark that the preserving module saves is updated to preset
Non-default mark;
Alternatively, second update module, specifically for obtaining the current keyboard input letter of module acquisition when described second
The correction that breath is interference information, the preserving module saves is identified as default identification, and works as the value of first marking keys
When not being the first preset value or the second preset value that the preserving module saves, the correction mark that the preserving module is saved is more
It is newly preset non-default mark.
32. keyboard filter driving according to claim 31, which is characterized in that the rectification module includes operation submodule
With update submodule,
The operation submodule, the current keyboard input information for obtaining when the second acquisition module are not interference letter
The correction mark that breath, the preserving module save is not default identification, and when the value of first marking keys is first pre-
If when value or the second preset value, the third preset value that the value of the first marking keys and the preserving module save is carried out position or fortune
It calculates;
Alternatively, the operation submodule, the current keyboard input information for obtaining when the second acquisition module are not
The correction mark that interference information, the preserving module save is not default identification, and when the value of the first marking keys and currently
When the corresponding key-press status value of keyboard input information is equal, by the third of the value of the first marking keys and preserving module preservation
Preset value carries out position or operation;
The update submodule, for using the operation result of the operation submodule to update the first marking keys.
33. keyboard filter driving according to claim 31, which is characterized in that the rectification module includes operation submodule
With update submodule,
The operation submodule, the current keyboard input information for obtaining when the second acquisition module are not interference letter
The correction mark that breath, the preserving module save is not default identification, and when the value of first marking keys is first pre-
If when value or the second preset value, the third preset value that the value of the first marking keys and the preserving module save being carried out plus being transported
It calculates;
Alternatively, the operation submodule, the current keyboard input information for obtaining when the second acquisition module are not
The correction mark that interference information, the preserving module save is not default identification, and when the value of the first marking keys and currently
When the corresponding key-press status value of keyboard input information is equal, by the third of the value of the first marking keys and preserving module preservation
Preset value carries out plus operation;
The update submodule, for using the operation result of the operation submodule to update the first marking keys.
34. keyboard filter driving according to claim 22, which is characterized in that further include that the second judgment module and third are sentenced
Disconnected module;
Second judgment module, for obtain current keyboard from the keyboard input data defeated when the second acquisition module
After entering information, the correction for judging that the preserving module saves is identified whether as default identification;
The rectification module, specifically for not being when second judgment module judges that the correction that the preserving module saves identifies
When default identification, the first marking keys in current keyboard input information are corrected;
First update module, specifically for judging that the correction that the preserving module saves identifies when second judgment module
It is not default identification, after the rectification module corrects the first marking keys in current keyboard input information, by the preservation
The correction mark that module saves is updated to default identification;
The third judgment module, for judging whether the current keyboard input information after the rectification module correction is interference letter
Breath;
The memory module, it is defeated specifically for the current keyboard after third judgment module judges rectification module correction
When to enter information not be interference information, the current keyboard input information after rectification module correction is saved in keyboard input data
Middle corresponding position.
35. keyboard filter driving according to claim 34, which is characterized in that
The correction that the preserving module saves is identified as the second marking keys, and the default identification is default marking keys;
The rectification module, specifically for judging the second marking keys that the preserving module saves when second judgment module
When not being default marking keys, corrected in current keyboard input information according to the second marking keys that the preserving module saves
First marking keys;
First update module, specifically for the second marking keys saved when the rectification module according to the preserving module
After correcting the first marking keys in current keyboard input information, the second marking keys that the preserving module is saved update
To default marking keys.
36. keyboard filter driving according to claim 35, which is characterized in that the rectification module includes operation submodule
With update submodule;
The operation submodule, for judging the second marking keys of the preserving module preservation when second judgment module not
When being default marking keys, the value for the second marking keys that the preserving module saves is added with the value of the first marking keys;
The update submodule, for using the operation result of the operation submodule to update the first marking keys;
Second update module, the current keyboard input information specifically for obtaining module acquisition when described second is dry
Information is disturbed, when the second marking keys that the preserving module saves are default marking keys, by current keyboard input information the
The value of one marking keys subtracts corresponding key-press status value, updates the second key that the preserving module saves using operation result
Mark.
37. keyboard filter driving according to claim 35, which is characterized in that the rectification module includes operation submodule
With update submodule;
The operation submodule, for judging the second marking keys of the preserving module preservation when second judgment module not
When being default marking keys, the value for the second marking keys that the preserving module is saved and the value of the first marking keys carry out position
Or operation;
The update submodule, for using the operation result of the operation submodule to update the first marking keys;
Second update module, the current keyboard input information specifically for obtaining module acquisition when described second is dry
Information is disturbed, it is when the second marking keys that the preserving module saves are default marking keys, current keyboard input information is corresponding
Key-press status value negate, the value that will negate the first marking keys in result and current keyboard input information carries out position and operation,
The second marking keys that the preserving module saves are updated using operation result.
38. keyboard filter driving according to claim 35, which is characterized in that
The preserving module is also used to save the first preset value and the second preset value;For being obtained when the second acquisition module
Current keyboard input information when being interference information, save corresponding with current keyboard input information information and record;
The rectification module, specifically for judging the second marking keys that the preserving module saves when second judgment module
Be not default marking keys, and the value of first marking keys be the first preset value or the second preset value when, using described
The second marking keys that preserving module saves update the first marking keys in current keyboard input information;
Alternatively, the rectification module, specifically for judging that the second of the preserving module preservation presses when second judgment module
Key mark is not default marking keys, and when the value key-press status corresponding with current keyboard input information of the first marking keys
When being worth equal, the first key mark in current keyboard input information is updated using the second marking keys that the preserving module saves
Know;
Second update module, the current keyboard input information specifically for obtaining module acquisition when described second is dry
Information is disturbed, the second marking keys that the preserving module saves are default marking keys, and work as first marking keys not
When for the first preset value or the second preset value, the second key mark that the preserving module saves is updated using the first marking keys
Know;
Alternatively, second update module, specifically for obtaining the current keyboard input letter of module acquisition when described second
Breath is interference information, and the second marking keys that the preserving module saves are default marking keys, and when the first marking keys
Value key-press status value corresponding with current keyboard input information it is unequal when, use the first marking keys to update the preservation mould
The second marking keys that block saves;
Alternatively, second update module, specifically for obtaining the current keyboard input letter of module acquisition when described second
Breath is interference information, and the second marking keys that the preserving module saves are default marking keys, and when the first marking keys
Value and the third marking keys in corresponding information record value it is unequal when, use the first marking keys to update the preservation
The second marking keys that module saves.
39. keyboard filter driving according to claim 34, which is characterized in that
The preserving module is also used to save third preset value, the first preset value and the second preset value;It is obtained for working as described second
When the current keyboard input information that modulus block obtains is interference information, information note corresponding with current keyboard input information is saved
Record;
The rectification module, specifically for not being when second judgment module judges that the correction that the preserving module saves identifies
Default identification, and when the value of first marking keys is the first preset value or the second preset value, according to the preservation mould
The third preset value that block saves corrects the first marking keys in current keyboard input information;
Alternatively, rectification module, specifically for judging that the correction that the preserving module saves identifies not when second judgment module
It is default identification, and when the value of the first marking keys key-press status value corresponding with current keyboard input information is equal, root
The first marking keys in current keyboard input information are corrected according to the third preset value that the preserving module saves;
First update module, specifically for being rectified when the rectification module according to the third preset value that the preserving module saves
After the first marking keys in proper preceding keyboard input information, the correction mark that the preserving module saves is updated to default
Mark;
Second update module, the current keyboard input information specifically for obtaining module acquisition when described second is dry
Disturb information, the second marking keys that the preserving module saves are default marking keys, and when the value of the first marking keys with
When the value of third marking keys in corresponding information record is unequal, the correction mark that the preserving module saves is updated to
Preset non-default mark;
Alternatively, second update module, specifically for obtaining the current keyboard input letter of module acquisition when described second
Breath is interference information, and the second marking keys that the preserving module saves are default marking keys, and when the first marking keys
Value key-press status value corresponding with current keyboard input information it is unequal when, the correction mark that the preserving module is saved is more
It is newly preset non-default mark;
Alternatively, second update module, specifically for obtaining the current keyboard input letter of module acquisition when described second
Breath is interference information, and the second marking keys that the preserving module saves are default marking keys, and work as first key
When mark is not the first preset value or the second preset value, the correction mark that the preserving module saves is updated to preset non-silent
Recognize mark.
40. keyboard filter driving according to claim 39, which is characterized in that the rectification module includes operation submodule
With update submodule;
The operation submodule, the correction mark for judging that the preserving module saves when second judgment module is not silent
When recognizing mark, and when the value of first marking keys is the first preset value or the second preset value, by the first marking keys
Value and the third preset value that saves of the preserving module carry out position or operation;
Alternatively, the operation submodule, for judging the correction mark that the preserving module saves when second judgment module
It is not default identification, and when the value of the first marking keys key-press status value corresponding with current keyboard input information is equal,
The third preset value that the value of first marking keys and the preserving module save is subjected to position or operation;
The update submodule, for using the operation result of the operation submodule to update the first marking keys.
41. keyboard filter driving according to claim 39, which is characterized in that the rectification module includes operation submodule
With update submodule;
The operation submodule, the correction mark for judging that the preserving module saves when second judgment module is not silent
When recognizing mark, and when the value of first marking keys is the first preset value or the second preset value, by the first marking keys
Value and the third preset value that saves of the preserving module carry out plus operation;
Alternatively, the operation submodule, for judging the correction mark that the preserving module saves when second judgment module
It is not default identification, and when the value of the first marking keys key-press status value corresponding with current keyboard input information is equal,
It carries out the third preset value that the value of the first marking keys and the preserving module save to add operation;
The update submodule, for using the operation result of the operation submodule to update the first key mark.
42. keyboard filter driving according to claim 22, which is characterized in that the memory module is also used to when described
The current keyboard input information that second acquisition module obtains is not interference information, and the correction that the preserving module saves identifies
When for default identification, the current keyboard input information that the second acquisition module obtains is saved in keyboard input data corresponding
Position.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610681143.2A CN106293132B (en) | 2016-08-17 | 2016-08-17 | A kind of method and keyboard filter driving improving keyboard input correctness |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610681143.2A CN106293132B (en) | 2016-08-17 | 2016-08-17 | A kind of method and keyboard filter driving improving keyboard input correctness |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106293132A CN106293132A (en) | 2017-01-04 |
CN106293132B true CN106293132B (en) | 2019-03-05 |
Family
ID=57679682
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610681143.2A Active CN106293132B (en) | 2016-08-17 | 2016-08-17 | A kind of method and keyboard filter driving improving keyboard input correctness |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106293132B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109725815B (en) * | 2019-01-09 | 2021-02-23 | 北京数衍科技有限公司 | Method for distinguishing data input of scanning gun and keyboard |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2615743Y (en) * | 2003-03-25 | 2004-05-12 | 联想(北京)有限公司 | PS/2 keyboard with energy-saving and high driving capacity selection |
US7426582B1 (en) * | 2005-04-29 | 2008-09-16 | American Megatrends, Inc. | Method, system, and apparatus for servicing PS/2 devices within an extensible firmware interface environment |
CN102053712A (en) * | 2009-11-02 | 2011-05-11 | 研祥智能科技股份有限公司 | Multi-keyboard input system, input equipment, switching device and control method |
CN103534676A (en) * | 2012-04-30 | 2014-01-22 | 黑莓有限公司 | Touchscreen keyboard with correction of previously input text |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106249949B (en) * | 2011-09-07 | 2018-03-20 | 辛纳普蒂克斯公司 | Capacitive sensing during non-display renewal time |
-
2016
- 2016-08-17 CN CN201610681143.2A patent/CN106293132B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2615743Y (en) * | 2003-03-25 | 2004-05-12 | 联想(北京)有限公司 | PS/2 keyboard with energy-saving and high driving capacity selection |
US7426582B1 (en) * | 2005-04-29 | 2008-09-16 | American Megatrends, Inc. | Method, system, and apparatus for servicing PS/2 devices within an extensible firmware interface environment |
CN102053712A (en) * | 2009-11-02 | 2011-05-11 | 研祥智能科技股份有限公司 | Multi-keyboard input system, input equipment, switching device and control method |
CN103534676A (en) * | 2012-04-30 | 2014-01-22 | 黑莓有限公司 | Touchscreen keyboard with correction of previously input text |
Non-Patent Citations (2)
Title |
---|
《基于Small RTOS51 的PS /2 键盘驱动程序开发》;王志国 等;;《单片机与嵌入式***应用》;20061231(第7期);第28-29页; |
《基于Windows CE PS 2/ 键盘的同步串口实现》;周英杰 等;;《现代电子技术》;20061231(第229期);第83-87页; |
Also Published As
Publication number | Publication date |
---|---|
CN106293132A (en) | 2017-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106293132B (en) | A kind of method and keyboard filter driving improving keyboard input correctness | |
CN102364925A (en) | Method for automatically recording call content and selectively storing content at mobile phone terminal and system | |
CN107633475A (en) | A kind of image processing method, terminal and computer-readable recording medium | |
CN108377289A (en) | Information amending method, device and computer readable storage medium are sent | |
CN107678798A (en) | A kind of SIM card fast initializing method, device and computer-readable recording medium | |
CN108196774A (en) | A kind of message consults method, flexible screen terminal and computer readable storage medium | |
CN107832068A (en) | A kind of application upgrade method, mobile terminal and computer-readable recording medium | |
CN107666411B (en) | System and method for recognizing voice chip and loading voice software in home gateway | |
CN106157962B (en) | A kind of sound effect treatment method and mobile terminal | |
CN107426420A (en) | A kind of method, apparatus and computer-readable recording medium for protecting associated person information | |
CN107948387A (en) | Terminal control method and device, terminal and readable storage medium storing program for executing | |
US8229507B2 (en) | Method for setting voice tag | |
CN106802810A (en) | Firmware upgrade method and device, system | |
CN107786713A (en) | Telephone number adjusts | |
CN108566485A (en) | A kind of unlocking method, terminal and computer readable storage medium | |
CN108021520A (en) | Display methods, device and the computer-readable recording medium of access device title | |
CN107329684A (en) | A kind of edge interaction control method, equipment and computer-readable recording medium | |
CN109086584A (en) | Data processing method, device, computer equipment and storage medium | |
TW200642423A (en) | Phone and dialing method thereof | |
JP3767276B2 (en) | System call information recording method and recording apparatus | |
CN107465842A (en) | The calling-out method and terminal device of call center | |
CN104683592B (en) | Mobile terminal and working mode switching method thereof | |
CN104010058B (en) | Automatic calling method and device | |
CN106782538A (en) | A kind of speech recognition control system and method | |
CN105897984A (en) | Voice shorthand device with all Netcom call function |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |