CN113268145B - Physical input device input method, system, electronic device and storage medium - Google Patents
Physical input device input method, system, electronic device and storage medium Download PDFInfo
- Publication number
- CN113268145B CN113268145B CN202110583036.7A CN202110583036A CN113268145B CN 113268145 B CN113268145 B CN 113268145B CN 202110583036 A CN202110583036 A CN 202110583036A CN 113268145 B CN113268145 B CN 113268145B
- Authority
- CN
- China
- Prior art keywords
- input
- equipment
- input device
- identification code
- specific
- 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
Images
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
- G06F3/0233—Character input methods
-
- 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/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/038—Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Input From Keyboards Or The Like (AREA)
Abstract
The invention provides a physical input device input method, a physical input device input system, an electronic device and a storage medium, wherein the method comprises an input device defining step, a specific input device is defined, an identification code is assigned to the specific input device, and when an operating environment receives external input, the source of the external input is judged; and an input method processing step, namely if the external input is judged to be the specific input equipment according to the identification code, directly inputting the content input by the specific input equipment to an interface in the operating environment without an input method in the operating environment. The invention solves the problems of disordered input and poor flexibility of the input method of the traditional physical input equipment.
Description
Technical Field
The invention belongs to the technical field of input, and particularly relates to a physical input device input method, a physical input device input system, an electronic device and a storage medium.
Background
In a daily use scenario of the Android device, keyboard character information input through the physical input device is processed through a tool chain before being sent to a target view, and characters of a corresponding language are output through a soft keyboard corresponding to an input method. And the input confusion can be caused after the non-language input equipment such as scanning gun input and the like is processed by the input method. It is therefore necessary to redesign the interaction logic for operational convenience.
In the prior art, characters input by a keyboard are mainly distinguished, but the flexibility is poor due to the fact that the type of equipment or specific equipment is not distinguished.
Disclosure of Invention
The embodiment of the application provides an input method and system of a physical input device, an electronic device and a storage medium, and aims to at least solve the problems of input confusion and poor flexibility of the existing input method of the physical input device.
In a first aspect, an embodiment of the present application provides a physical input device input method, including: an input device defining step, wherein a specific input device is defined, an identification code is assigned to the specific input device, and when an operating environment receives external input, the source of the external input is judged; and an input method processing step, wherein if the external input is judged to be the specific input equipment according to the identification code, the content input by the specific input equipment is directly input to an interface in the operating environment without an input method in the operating environment.
Preferably, the input device defining step further includes: the identification code is stored in the operating environment in the form of a system variable.
Preferably, the input device defining step further includes: the determination is made by the source of the external input from ViewRootimpl in the operating environment.
Preferably, the input device defining step further comprises: and setting a visual interface, and managing the specific input equipment in the visual interface.
In a second aspect, an embodiment of the present application provides a physical input device input system, which is applicable to the physical input device input method, and includes: the input equipment definition module defines a specific input equipment, assigns an identification code to the specific input equipment, and judges the source of the external input when an operating environment receives the external input; and the input method processing module is used for directly inputting the content into an interface in the operating environment without an input method in the operating environment if the external input is judged to be the specific input equipment according to the identification code.
In some embodiments, the input device definition module further comprises: the identification code is stored in the operating environment in the form of a system variable.
In some embodiments, the input device definition module further comprises: the determination is made by the source of the external input from ViewRootimpl in the operating environment.
In some embodiments, the input device definition module further comprises: and setting a visual interface, and managing the specific input equipment in the visual interface.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the physical input device input method according to the first aspect is implemented.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the physical input device input method according to the first aspect.
Compared with the related technology, the embodiment of the application distinguishes different input devices and the stored logic and the redesign of the Android input process, so that the stored devices can not pass through an input method any more; the device can be configured by the device model, and custom configuration is also supported. Has stronger practicability and flexibility.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of a physical input device input method of the present invention;
FIG. 2 is a block diagram of a physical input device input system of the present invention;
FIG. 3 is a block diagram of an electronic device of the present invention;
in the above figures:
1. an input device definition module; 2. an input method processing step; 60. a bus; 61. a processor; 62. a memory; 63. a communication interface.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Embodiments of the invention are described in detail below with reference to the following drawings:
fig. 1 is a flowchart of an input method of a physical input device according to the present invention, and please refer to fig. 1, the input method of the physical input device according to the present invention includes the following steps:
s1: defining a specific input device, assigning an identification code to the specific input device, and judging the source of the external input when an operating environment receives the external input.
Optionally, the identification code is stored in the operating environment in the form of a system variable. Optionally, the determination is made by the source of the external input by ViewRootimpl in the operating environment.
In specific implementation, the Android native input system is redesigned, a unique identification code for distinguishing input information source equipment is configured during character input, original tool chain logic capable of being modified is used, so that the equipment identification code is distinguished logically, once the equipment codes are successfully matched, tool chains corresponding to all information of equipment conform to the logic after modification, and the input method is bypassed when the character information is sent to a view through the logic after modification. The identification information of the equipment is stored in the system through variables, so that the equipment is safe and convenient to call.
In a specific implementation, when the input device is used, a determination is made as to the current input device.
Optionally, a visualization interface is provided, and the specific input device is managed in the visualization interface.
In one embodiment, the identification code of the physical keyboard that needs to bypass the soft keyboard is stored in a system variable that is not readable by the user, ensuring information security in real time and upon reboot.
In a specific implementation, views are added in the setup. Each time a character input device is inserted into the device, a button corresponding to the character input device is generated in the view. Each time the view is entered, the button will acquire its state according to the content of the variable, and when the device to which it is bound is included in the variable, the button state will be set to on, otherwise it will be off. When the button is turned on, the corresponding equipment information can be added into the variable, when the button is turned off, the corresponding equipment information can be deleted from the variable, in the specific implementation, the information can be stored in real time, and the accidental power failure and the shutdown of the equipment cannot be influenced.
S2: and if the external input is judged to be the specific input equipment according to the identification code, the content input by the specific input equipment is directly input to an interface in the operating environment without an input method in the operating environment.
In the specific implementation, if the identification code of the equipment used is contained in the specific variable, the information input by the equipment cannot pass through an input method; if the identification code of the device in use is not included in the specific variable, the information input by the device is passed through the input method.
In specific implementation, under the implementation logic of an original physical key, a key value of the key inevitably passes through an input method, event distribution inevitably is submitted to an inputMethodManager by viewrootimpl, then is submitted upwards step by step, an event is sent to a dispatch to a keyent by an Abstract InpitMethodService, and finally is received by Pinyin IME. After receiving the event from keyevent, pinyinIME will send the event to the input method software for processing, and the messy code is generated at this time. After PinyinIME has processed the event from keyevent, it will send a new event.
In specific implementation, in the embodiment of the application, the source device of the event is selected to be judged in the view rootimpl, and the corresponding event is directly delivered to the phonewindows and is finally input into the final view.
Fig. 2 is a block diagram of a physical input device input system according to the present invention, please refer to fig. 2, which includes:
input device definition module 1: defining a specific input device, assigning an identification code to the specific input device, and judging the source of external input when an operating environment receives the external input.
Optionally, the identification code is stored in the operating environment in the form of a system variable. Optionally, the determination is made by the source of the external input from ViewRootimpl in the operating environment.
In specific implementation, the Android native input system is redesigned, a unique identification code for distinguishing input information source equipment is configured during character input, original tool chain logic capable of being modified is used, so that the equipment identification code is distinguished logically, once the equipment codes are successfully matched, tool chains corresponding to all information of equipment conform to the logic after modification, and the input method is bypassed when the character information is sent to a view through the logic after modification. The identification information of the equipment is stored in the system through variables, so that the equipment is safe and convenient to call.
In a specific implementation, when the input device is used, a determination is made as to the current input device.
Optionally, a visual interface is provided, and the specific input device is managed in the visual interface.
In one implementation, the identification code of the physical keyboard that needs to bypass the soft keyboard is stored in a system variable that is not readable by the user, ensuring information security in real time and upon reboot.
In a specific implementation, views are added in the setup. Each time a character input device is inserted into the device, a button corresponding to the character input device is generated in the view. Each time the view is entered, the button will acquire its state according to the content of the variable, and when the device to which it is bound is included in the variable, the button state will be set to on, otherwise it will be off. When the button is turned on, the corresponding equipment information can be added into the variable, when the button is turned off, the corresponding equipment information can be deleted from the variable, in the specific implementation, the information can be stored in real time, and the accidental power failure and the shutdown of the equipment cannot be influenced.
The input method processing module 2: and if the external input is judged to be the specific input equipment according to the identification code, directly inputting the content input by the specific input equipment to an interface in the operating environment without an input method in the operating environment.
In the specific implementation, if the identification code of the equipment used is contained in the specific variable, the information input by the equipment cannot pass through an input method; if the identification code of the device in use is not included in the specific variable, the information input by the device is passed through the input method.
In specific implementation, under the implementation logic of an original physical key, a key value of the key inevitably passes through an input method, event distribution inevitably is submitted to an inputMethodManager by viewrootimpl, then is submitted upwards step by step, an event is sent to a dispatch to a keyent by an Abstract InpitMethodService, and finally is received by Pinyin IME. After receiving the event from keyevent, pinyinIME will send the event to the input method software for processing, and the messy code is generated at this time. After PinyinIME has processed the event from keyevent, it will send a new event.
In specific implementation, in the embodiment of the application, the source device of the event is selected to be judged in the view rootimpl, and the corresponding event is directly delivered to the phonewindows and is finally input into the final view.
In addition, the physical input device input method described in connection with FIG. 1 may be implemented by an electronic device. Fig. 3 is a block diagram of an electronic device of the present invention.
The electronic device may comprise a processor 61 and a memory 62 in which computer program instructions are stored.
In particular, the processor 61 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present Application.
The memory 62 may be used to store or cache various data files that need to be processed and/or used for communication, as well as possible computer program instructions executed by the processor 61.
The processor 61 implements any of the physical input device input methods in the above embodiments by reading and executing computer program instructions stored in the memory 62.
In some of these embodiments, the electronic device may also include a communication interface 63 and a bus 60. As shown in fig. 3, the processor 61, the memory 62, and the communication interface 63 are connected via a bus 60 to complete communication therebetween.
The communication port 63 may be implemented with other components such as: the data communication is carried out among external equipment, image/data acquisition equipment, a database, external storage, an image/data processing workstation and the like.
The bus 60 includes hardware, software, or both to couple the components of the electronic device to one another. Bus 60 includes, but is not limited to, at least one of the following: data Bus (Data Bus), address Bus (Address Bus), control Bus (Control Bus), expansion Bus (Expansion Bus), and Local Bus (Local Bus). By way of example and not limitation, bus 60 may include an Accelerated Graphics Port (AGP) or other Graphics Bus, an Enhanced Industrial Standard Architecture (EISA) Bus, a Front-Side Bus (FSB), a Hypertransport (HT) Interconnect, an ISA (ISA) Bus, a wireless bandwidth (InfiniBand) Interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a microchannel Architecture (mcma) Bus, a PCI-Express (PCI-interface) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (vladvanced Technology, SATA) Bus, a Video Association (Video Association) Bus, or a combination of two or more of these or other suitable electronic buses. Bus 60 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
The electronic device may perform the physical input device input method in the embodiments of the present application.
In addition, in combination with the physical input device input method in the foregoing embodiments, the embodiments of the present application may provide a computer-readable storage medium to implement. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the physical input device input methods in the embodiments described above.
And the aforementioned storage medium includes: a U-disk, a portable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (8)
1. A physical input device input method, comprising:
an input device defining step, defining a specific input device, assigning an identification code to the specific input device, and judging the source of the external input when an operating environment receives the external input;
an input method processing step, wherein if the external input is judged to be the specific input equipment according to the identification code, the content input by the specific input equipment does not pass through an input method in the operation environment, and the content is directly input to an interface in the operation environment;
when character input is carried out, a unique identification code for distinguishing input information source equipment is configured, original tool chain logic can be modified, so that the equipment identification codes are distinguished logically, once the equipment codes are successfully matched, tool chains of all information of corresponding equipment conform to the logic after modification, and the logic after modification bypasses an input method when character information is sent to a view;
wherein, the source device of the event is judged in the ViewRootimpl, and the corresponding event is directly delivered to the phonewindows and finally input into the final view.
2. The physical input device input method of claim 1, wherein the input device defining step further comprises: the identification code is stored in the operating environment in the form of a system variable.
3. The physical input device input method of claim 1, wherein the input device defining step further comprises: and setting a visual interface, and managing the specific input equipment in the visual interface.
4. A physical input device input system, comprising:
the input equipment definition module defines a specific input equipment, assigns an identification code to the specific input equipment, and judges the source of the external input when an operating environment receives the external input;
the input method processing module is used for directly inputting the content into an interface in the operating environment without an input method in the operating environment if the external input is judged to be the specific input equipment according to the identification code;
when the character is input, a unique identification code for distinguishing input information source equipment is configured, original tool chain logic can be modified, so that the equipment identification code is distinguished logically, once the equipment code is successfully matched, the tool chain corresponding to all information of the equipment conforms to the logic after modification, and the logic after modification bypasses an input method when the character information is sent to a view;
wherein, the source device of the event is judged in the ViewRootimpl, and the corresponding event is directly delivered to the phonewindows and finally input into the final view.
5. The physical input device input system of claim 4, wherein the input device definition module further comprises: the identification code is stored in the operating environment in the form of a system variable.
6. The physical input device input system of claim 4, wherein the input device definition module further comprises: and setting a visual interface, and managing the specific input equipment in the visual interface.
7. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the physical input device input method of any one of claims 1 to 3 when executing the computer program.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a physical input device input method according to any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110583036.7A CN113268145B (en) | 2021-05-27 | 2021-05-27 | Physical input device input method, system, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110583036.7A CN113268145B (en) | 2021-05-27 | 2021-05-27 | Physical input device input method, system, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113268145A CN113268145A (en) | 2021-08-17 |
CN113268145B true CN113268145B (en) | 2023-01-03 |
Family
ID=77233094
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110583036.7A Active CN113268145B (en) | 2021-05-27 | 2021-05-27 | Physical input device input method, system, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113268145B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6690303B1 (en) * | 2000-08-03 | 2004-02-10 | General Research Of Electronics, Inc. | Character input method |
CN106548574A (en) * | 2016-11-04 | 2017-03-29 | 上海秉坤数码科技有限公司 | POS system, bluetooth connection equipment |
CN106844071A (en) * | 2015-12-04 | 2017-06-13 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus for obtaining input data |
CN107391473A (en) * | 2017-07-17 | 2017-11-24 | 百望电子发票数据服务有限公司 | A kind of scan data processing method, data processing equipment and related system |
CN112218281A (en) * | 2020-11-11 | 2021-01-12 | 迅镭智能(广州)科技有限公司 | Scanning gun connection method, device, terminal and medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101231636B (en) * | 2007-01-25 | 2013-09-25 | 北京搜狗科技发展有限公司 | Convenient information search method, system and an input method system |
-
2021
- 2021-05-27 CN CN202110583036.7A patent/CN113268145B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6690303B1 (en) * | 2000-08-03 | 2004-02-10 | General Research Of Electronics, Inc. | Character input method |
CN106844071A (en) * | 2015-12-04 | 2017-06-13 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus for obtaining input data |
CN106548574A (en) * | 2016-11-04 | 2017-03-29 | 上海秉坤数码科技有限公司 | POS system, bluetooth connection equipment |
CN107391473A (en) * | 2017-07-17 | 2017-11-24 | 百望电子发票数据服务有限公司 | A kind of scan data processing method, data processing equipment and related system |
CN112218281A (en) * | 2020-11-11 | 2021-01-12 | 迅镭智能(广州)科技有限公司 | Scanning gun connection method, device, terminal and medium |
Non-Patent Citations (1)
Title |
---|
图解Android-Android GUI系统(5)-Android的Event Input System;漫天尘沙;《https://www.shuzhiduo.com/A/kvJ3XlPA5g/》;20131112;正文第1-12页 * |
Also Published As
Publication number | Publication date |
---|---|
CN113268145A (en) | 2021-08-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109743315B (en) | Behavior identification method, behavior identification device, behavior identification equipment and readable storage medium for website | |
RU2575985C2 (en) | Method and apparatus for vetting executable program using model | |
CN103530535A (en) | Shell adding and removing method for Android platform application program protection | |
CN107797854B (en) | Transaction file processing method and device, storage medium and computer equipment | |
CN110489466B (en) | Method and device for generating invitation code, terminal equipment and storage medium | |
CN107273150B (en) | Preloading firmware downloading and writing method and device | |
CN113094742B (en) | Data desensitizing method, data desensitizing device, electronic equipment and storage medium | |
CN110325994A (en) | Enhance the device and method of the control stream integrality of software application | |
CN112001376B (en) | Fingerprint identification method, device, equipment and storage medium based on open source component | |
CN112966713A (en) | DGA domain name detection method and device based on deep learning and computer equipment | |
CN107480513B (en) | Authentication implementation method and device, computer device and readable storage medium | |
CN108600259B (en) | Authentication and binding method of equipment, computer storage medium and server | |
US9842018B2 (en) | Method of verifying integrity of program using hash | |
CN113268145B (en) | Physical input device input method, system, electronic device and storage medium | |
KR101259696B1 (en) | System for scanning of anti-malware and method thereof | |
US9953157B2 (en) | Method and apparatus for protecting application program | |
CN113836955A (en) | Output configuration method and system for scanning gun, electronic equipment and storage medium | |
CN111538481B (en) | Application program customization method and system | |
CN113486359B (en) | Method and device for detecting software loopholes, electronic device and storage medium | |
CN109299948A (en) | A kind of red packet sending method, device, wearable device and storage medium | |
CN109840080B (en) | Character attribute comparison method and device, storage medium and electronic equipment | |
CN107315951B (en) | Program installation package anti-interception method and device | |
CN107403103A (en) | File decryption method and apparatus | |
CN105068832A (en) | Method and apparatus for generating executable file | |
CN113139190A (en) | Program file detection method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |