Key processing method, device and medium
By introducing pre-operation sub-attributes into the key attributes, virtual key code and pre-op determine mapping characters together, solving the problem of frequent switching of language modes for multilingual input, and realizing cross-language key mapping and development costs.
Patent Information
- Application Number
- CN202110351239.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-03-31
AI Technical Summary
The prior art requires frequent switching of language modes during multilingual input, resulting in extended product cycles and increased development costs, and the continuous intervention of developers and language users increases complexity.
By introducing key attribute items, including key attribute items of character type and pre-operation sub-attributes, virtual key codes and pre-operation operations jointly determine mapping characters, realizing cross-language key mapping.
It realizes multi-language input without switching language modes, reduces product cycles and development costs, and decouples development code and language attributes.
Smart Images

Figure CN113076011B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information input, and in particular to a key processing method, device and medium. Background Art
[0002] When the user triggers a physical key, the operating system passes a virtual key code to the input method program instead of the character corresponding to the physical key. After receiving the virtual key code, the input method program converts the virtual key code into a specific character in the current language environment. The process of mapping a virtual key code to a specific character in the language environment is called key mapping.
[0003] Different languages usually correspond to different key mappings. Take the virtual key code 0x41 corresponding to the A key as an example. In the English environment, the character corresponding to the case of not clicking shift is "a" (English character, unicode is U+0061), and the character corresponding to the case of activating capslock is "A" (English character, unicode is U+0041). In the Tibetan environment, the character corresponding to the case of not clicking shift is (Tibetan character, unicode is U+0F60), click shift to select the corresponding character (Tibetan character, unicode is U+0F71).
[0004] In actual applications, developers do not understand the grammatical specifications of the language, and language users do not understand software development. The current approach is usually: developers and language users cooperate with each other to develop products based on language; the continuous involvement of developers and language users will lead to a longer product cycle and higher development costs.
[0005] Moreover, developing products based on language will make products in different languages independent of each other, which will require users to frequently switch products to achieve multi-language input. For example, an input method program has multiple language modes, one of which corresponds to one product. Multiple language modes usually include: Chinese, English, Tibetan, etc. If you want to input other languages in one language mode, you need to switch the language mode. Summary of the invention
[0006] In view of the above problems, embodiments of the present invention are proposed to provide a key processing method, device and medium that overcome the above problems or at least partially solve the above problems. The embodiments of the present invention can reduce product cycle and development cost, and can realize multi-language input without switching language modes.
[0007] In order to solve the above problem, an embodiment of the present invention discloses a key attribute item, including: a key attribute item of a character type;
[0008] The key attribute items of the character type correspond to the virtual key code of the key, including:
[0009] The mapped character sub-attribute represents the mapped character corresponding to the key; and
[0010] Prefix operation sub-attribute; wherein, the prefix operation corresponding to the prefix operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0011] In order to solve the above problem, an embodiment of the present invention discloses a key processing method, including:
[0012] Receiving a configured key attribute item; the key attribute item is the aforementioned key attribute item;
[0013] Stores the configured key attribute items.
[0014] In order to solve the above problem, the present invention discloses a key processing method, comprising:
[0015] Determine the key attribute item corresponding to the virtual key code of the trigger key;
[0016] Matching the state information of the preceding operation with the sub-attributes of the key attribute item;
[0017] For the successfully matched target key attribute item, the corresponding processing method information is determined; if the type of the target key attribute item is a character type, the processing method information includes: the mapping character corresponding to the mapping character sub-attribute of the target key attribute item;
[0018] The key attribute item of the character type includes a pre-operation sub-attribute, and the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0019] On the other hand, an embodiment of the present invention discloses a key processing device, including:
[0020] A receiving module, used to receive a configured key attribute item; the key attribute item is any one of the key attribute items 1 to 5; and
[0021] The storage module is used to store the configured key attribute items.
[0022] In another aspect, the present invention discloses a key processing device, comprising:
[0023] A key attribute item determination module, used to determine a key attribute item corresponding to a virtual key code of a triggering key;
[0024] a matching module, used to match the state information of the preceding operation with the sub-attributes of the key attribute item; and
[0025] The processing mode determination module is used to determine the corresponding processing mode information for the successfully matched target key attribute item; if the type of the target key attribute item is a character type, the processing mode information includes: the mapping character corresponding to the mapping character sub-attribute of the target key attribute item;
[0026] The key attribute item of the character type includes a pre-operation sub-attribute, and the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0027] In another aspect, an embodiment of the present invention discloses a device for key processing, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations:
[0028] Receive a configured key attribute item; the key attribute item is any one of the key attribute items 1 to 5;
[0029] Stores the configured key attribute items.
[0030] In another aspect, an embodiment of the present invention discloses a device for key processing, characterized in that it includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations:
[0031] Determine the key attribute item corresponding to the virtual key code of the trigger key;
[0032] Matching the state information of the preceding operation with the sub-attributes of the key attribute item;
[0033] For the successfully matched target key attribute item, the corresponding processing method information is determined; if the type of the target key attribute item is a character type, the processing method information includes: the mapping character corresponding to the mapping character sub-attribute of the target key attribute item;
[0034] The key attribute item of the character type includes a pre-operation sub-attribute, and the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0035] The embodiment of the present invention discloses one or more machine-readable media, characterized in that instructions are stored thereon, which, when executed by one or more processors, enable the device to execute the aforementioned method.
[0036] The embodiments of the present invention include the following advantages:
[0037] The embodiment of the present invention sets a pre-operation sub-attribute in the key attribute item, and the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0038] The key mapping of the embodiment of the present invention can be expressed as: virtual key code + pre-operation → mapping character. The same virtual key code can be combined with different pre-operations to obtain different characters of the same language or different characters of different languages, thereby realizing the decoupling between the development code corresponding to the key attribute item and the language attribute. On this basis, the decoupling of product development and language attributes can be realized, thereby reducing the product cycle and development cost.
[0039] Furthermore, in the key mapping of the embodiment of the present invention, the same virtual key code can be combined with different pre-operations to obtain different characters in different languages. Since cross-language key mapping can be achieved, multi-language input can be achieved without switching language modes, thereby improving input efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a schematic diagram of a key mapping according to an embodiment of the present invention;
[0041] Figure 2 is a flowchart of a key processing method embodiment of the present invention;
[0042] Figure 3 is a flowchart of a key processing method embodiment of the present invention;
[0043] Figure 4 is a schematic diagram of a key processing result of an embodiment of the present invention;
[0044] Figure 5 is a flowchart of a key processing method embodiment of the present invention;
[0045] Figure 6 is a flowchart of a key processing method embodiment of the present invention;
[0046] Figure 7 It is a structural block diagram of a key processing device of the present invention;
[0047] Figure 8It is a structural block diagram of a key processing device of the present invention;
[0048] Fig. 9 It is a structural block diagram of a key processing device of the present invention;
[0049] Fig.10 is a block diagram of a device 1300 for key processing of the present invention; and
[0050] Fig.11 It is a structural schematic diagram of a server of the present invention. DETAILED DESCRIPTION
[0051] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0052] Embodiment 1
[0053] In view of the technical problems of long product cycle and high development cost in traditional technology, the embodiment of the present invention provides a storage format of key mapping universal for multiple languages, which is compatible with key mapping of multiple languages. After the developer develops the framework of the storage format, the framework of the storage format can be handed over to the language user, and the language user configures the framework of the storage format.
[0054] Since the storage format can achieve unified specifications for multi-language key mapping, it can decouple product development from language attributes. In other words, developers can develop the storage format framework without paying attention to language attributes; language users can configure the storage format framework based on language attributes. The decoupling of product development and language attributes can reduce product cycles and development costs.
[0055] The storage format of the embodiment of the present invention may be referred to as a key attribute item. The key attribute item may correspond to the virtual key code of the key, and is used to characterize the attribute corresponding to the virtual key code of the key. The key attribute item may be stored as a data element in a computer. It is understood that a key may correspond to one or more key attribute items.
[0056] In the embodiment of the present invention, the type of the key attribute item may include: a character type or a preceding operation type. In a specific implementation, a type field may be set in the key attribute item to determine the type of the key attribute item through the type field.
[0057] Among them, the character type corresponds to a specific mapping character, which can realize the output of the mapping character.
[0058] Reference Figure 1, shows a schematic diagram of a key mapping of an embodiment of the present invention, wherein the key attribute item of the character type corresponds to the virtual key code of the key, specifically including:
[0059] The mapped character sub-attribute represents the mapped character corresponding to the key; and
[0060] Pre-operation sub-attribute; wherein the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0061] In order to achieve cross-language key mapping, the embodiment of the present invention sets a pre-operation sub-attribute in the key attribute item, and the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key. The key mapping of the embodiment of the present invention can be expressed as: virtual key code + pre-operation → mapping character.
[0062] Those skilled in the art can implement cross-language key mapping according to actual application requirements. Referring to Table 1, a schematic diagram of a cross-language key mapping of an embodiment of the present invention is shown. Among them, the same virtual key code can be combined with different pre-operations to obtain different characters in the same language or different characters in different languages, thereby realizing the decoupling between the development code corresponding to the key attribute item and the language attribute.
[0063] Table 1
[0064]
[0065]
[0066] In the embodiment of the present invention, for a key, the preceding operation may represent the key operation before the corresponding operation of the key. The preceding operation may include: one key operation or multiple key operations.
[0067] Those skilled in the art can determine the pre-operation corresponding to the virtual key code and the mapped character according to actual application requirements. The key corresponding to the pre-operation may include: at least one of the M key, the CapsLock key, the Shift key, the Alt key and the Ctrl key.
[0068] For example, the only definite mapping character of the A key on the standard keyboard is "a", and a technician in this field can construct the following key mapping: shift+ctrl+A→hello. In other words, when the preceding operation corresponding to the A key on the standard keyboard is shift+ctrl, the corresponding mapping character is "hello".
[0069] In the embodiment of the present invention, the mapping character sub-attribute of a key attribute item may represent one or more mapping characters. Optionally, in order to reduce the difficulty of remembering the key mapping for the user, the following key mapping may be constructed: virtual key code + preset pre-operation → mapping character set, so as to obtain the mapping character set corresponding to the virtual key code through the combination of the virtual key code and the preset pre-operation.
[0070] For example, taking the virtual key code shown in Table 1 as an example, it can be combined with pre-operation 1 to pre-operation 5 respectively to obtain single characters A1 to D1. Then the embodiment of the present invention can construct a key mapping of virtual key code 1+preset pre-operation 1→mapped character set 1, the preset pre-operation 1 can be different from any of pre-operation 1 to pre-operation 5, and the mapped character set 1 can include: all mapped characters corresponding to the virtual key code 1 and all pre-operation combinations, for example, the mapped character set 1 can be: {character A1 of the first language, character A2 of the first language, character B1 of the second language, character C1 of the third language, character D1 of the fourth language...}.
[0071] In a specific implementation, the above-mentioned pre-operation sub-attributes can be divided into the following types according to the processing attributes of the pre-operation:
[0072] The first pre-operation sub-attribute specifically includes: a mode identifier for caching; and / or
[0073] The second front operation sub-attribute specifically includes: a virtual key code corresponding to a system modifier key for recording an activation state.
[0074] Those skilled in the art may determine the key corresponding to the first pre-operation according to actual application requirements, such as the M key, the N key, etc. In actual applications, the mode identifier corresponding to the first pre-operation may be cached to record the state information corresponding to the first pre-operation.
[0075] The second pre-operation may correspond to system modifier keys such as CapsLock, Shift, Alt, and Ctrl. In practical applications, the activation state of the system modifier keys may be recorded to record the state information corresponding to the second pre-operation.
[0076] In an optional embodiment of the present invention, the key attribute item of the character type may further include: an operation sub-attribute, which represents the operation information corresponding to the mapped character. The operation information represents that when the virtual key code of the key is received, the operation corresponding to the mapped character needs to be performed, and can provide operation guidance.
[0077] Examples of operation information may include: word search processing, which is used to search for words corresponding to the mapped characters. Taking English and Tibetan as examples, words with the mapped characters as prefixes can be searched. Taking Chinese as an example, words with the mapped characters as syllables can be searched.
[0078] Examples of operation information may include: an on-screen operation for bringing mapped characters onto the screen.
[0079] Examples of operation information may include: ending the word search. For example, when the mapped character corresponds to a punctuation mark, the word search may be ended.
[0080] It can be understood that the above operation information is only used as an example. In fact, those skilled in the art can determine the operation information corresponding to a key attribute item according to actual application requirements.
[0081] In one embodiment of the present invention, the key attribute item of the character type specifically includes the following sub-attributes:
[0082] Map character sub-attribute char, map the key to the corresponding unicode character;
[0083] The operator attribute cop is the processing action to be performed when a unicode character is received;
[0084] The first pre-operation sub-attribute model is the name of the corresponding mode when a unicode character is received. If it is empty or does not exist, it indicates that there is no mode corresponding to the key attribute item;
[0085] The second front operation sub-attribute decorate corresponds to the activation state of the system modifier key when a unicode character is received; if it is empty or does not exist, it indicates that there is no system modifier key corresponding to the key attribute item.
[0086] In the embodiment of the present invention, the above-mentioned key attribute items may also include: key attribute items of the pre-operation type.
[0087] The key attribute item of the pre-operation type is used to describe the key or virtual key code corresponding to the pre-operation. The key attribute item of the pre-operation type may not realize the output of the mapped characters, but may realize the recording of the state information corresponding to the pre-operation.
[0088] In a specific implementation, the key attribute item of the pre-operation type may include: a key attribute item corresponding to a system modifier key, and the key attribute item may correspond to a virtual key code corresponding to the system modifier key. Usually, the system modifier key is used to implement keyboard conversion, so the key attribute item may not include sub-attributes. Of course, the system modifier key may also include sub-attributes, for example, the system modifier key may include an identification sub-attribute.
[0089] In a specific implementation, the key attribute items of the pre-operation type may include: key attribute items corresponding to the mode, and the key corresponding to the mode may be called a mode key. Generally, a mode key can realize the output of mapped characters and play the role of a pre-operation. Therefore, sub-attributes can be set for the key attribute items corresponding to the mode to realize the identification of the key attribute items corresponding to the mode. The mode key can be a character key different from the system modifier key. Those skilled in the art can determine the mode key according to the actual application requirements. The embodiment of the present invention does not limit the specific mode key.
[0090] In one implementation, the key attribute item of the preceding operation type includes: an identification sub-attribute representing a mode identifier for caching.
[0091] In another implementation, the key attribute item of the pre-operation type may further include: a mode pre-operation sub-attribute, which represents the pre-operation corresponding to the mode.
[0092] The mode pre-operation sub-attribute may include: a system modifier key sub-attribute, which indicates the activation state of the system modifier key corresponding to the mode. The mode pre-operation sub-attribute may include: a mode sub-attribute, which includes the identifier of the cache mode corresponding to the mode.
[0093] In one embodiment of the present invention, the key attribute item of the pre-operation type specifically includes the following sub-attributes:
[0094] Identifier sub-attribute name, used to uniquely identify the mode;
[0095] The modifier key sub-attribute decorate corresponds to the activation state of the system modifier key when a unicode character is received; if it is empty or does not exist, it indicates that there is no system modifier key corresponding to the key attribute item;
[0096] The prompt sub-attribute char is used to prompt for key combination errors. If it is empty or does not exist, it means that there is no key combination error and no prompt is needed.
[0097] In order to enable those skilled in the art to better understand the key attribute items of the embodiment of the present invention, an example of key attribute items corresponding to the M key of the standard keyboard is provided herein, the virtual key code corresponding to the M key of the standard keyboard is "0x4D", and the M key of the standard keyboard corresponds to multiple key attribute items, namely: key attribute item 1, key attribute item 2, key attribute item 3 and key attribute item 4. It can be understood that those skilled in the art can set more than four key attribute items for the M key of the standard keyboard according to actual application requirements.
[0098]
[0099]
[0100] In summary, the embodiment of the present invention sets a pre-operation sub-attribute in the key attribute item, and the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0101] The key mapping of the embodiment of the present invention can be expressed as: virtual key code + pre-operation → mapping character. The same virtual key code can be combined with different pre-operations to obtain different characters of the same language or different characters of different languages, thereby realizing the decoupling between the development code corresponding to the key attribute item and the language attribute. On this basis, the decoupling of product development and language attributes can be realized, thereby reducing the product cycle and development cost.
[0102] Furthermore, in the key mapping of the embodiment of the present invention, the same virtual key code can be combined with different pre-operations to obtain different characters in different languages. Since cross-language key mapping can be achieved, multi-language input can be achieved without switching language modes, thereby improving input efficiency.
[0103] Embodiment 2
[0104] Reference Figure 2 , shows a flowchart of a key processing method embodiment of the present invention, which may specifically include the following steps:
[0105] Step 201: receiving configured key attribute items;
[0106] Step 202: Store the configured key attribute items.
[0107] The embodiment of the present invention can be executed by the server of the input method program. It can be understood that the embodiment of the present invention is for Figure 2 The specific execution subject of the method shown is not limited.
[0108] In a specific implementation, after the framework of the key attribute item is developed, the framework of the key attribute item may be provided to the user, so that the user configures the framework of the key attribute item to obtain the configured key attribute item.
[0109] In the embodiment of the present invention, the framework of the key attribute item may include: a virtual key code field and a sub-attribute field corresponding to the key attribute item, and the corresponding configuration process may include: a process of filling the virtual key code field and the sub-attribute field respectively. The configured key attribute item may include: the field content of the virtual key code field and the field content of the sub-attribute field.
[0110] In a specific implementation, different key attribute items of character types may include different pre-operation sub-attributes, so that the recognition accuracy of key attribute items of character types in the key processing process can be improved.
[0111] For example, different key attribute items of the character type include: key attribute item A, key attribute item B, key attribute item C, and key attribute item D, etc. Assume that key attribute item A includes the first pre-operation sub-attribute A, and key attribute item B includes the first pre-operation sub-attribute B. Since the first pre-operation sub-attribute A is different from the first pre-operation sub-attribute B, key attribute item A and key attribute item B correspond to different pre-operation sub-attributes.
[0112] Assume that key attribute item C includes a first pre-operation sub-attribute A and a second pre-operation sub-attribute A, and key attribute item D includes a first pre-operation sub-attribute A and a second pre-operation sub-attribute. Since at least some of the pre-operation sub-attributes corresponding to key attribute item C and key attribute item D are different, the two correspond to different pre-operation sub-attributes.
[0113] In a specific implementation, the character type key attribute item and the pre-operation type key attribute item may include different pre-operation sub-attributes, so that the recognition accuracy of different types of key attribute items in the key processing process can be improved. Specifically, at least part of the pre-operation sub-attributes included in the character type key attribute item are different from at least part of the mode pre-operation sub-attributes corresponding to the pre-operation type.
[0114] In actual applications, before storing the configured key attribute items, the conflict of the pre-operation sub-attributes of the configured key attribute items and the stored key attribute items can be judged. If the judgment result is the same, the configured key attribute items are not stored, and the corresponding conflict prompt information is output; or, if the judgment result is different, the configured key attribute items are stored.
[0115] The embodiment of the present invention may use a configuration file or a database to store the configured key attribute items. It is understood that the embodiment of the present invention does not limit the specific storage method of the configured key attribute items.
[0116] Embodiment 3
[0117] Reference Figure 3 , shows a flowchart of a key processing method embodiment of the present invention, which may specifically include the following steps:
[0118] Step 301, determining a key attribute item corresponding to a virtual key code of a triggering key;
[0119] Step 302: Match the state information of the preceding operation with the sub-attributes of the key attribute item;
[0120] Step 303: determining corresponding processing mode information for the successfully matched target key attribute item; if the type of the target key attribute item is a character type, the processing mode information may include: a mapping character corresponding to the mapping character sub-attribute of the target key attribute item;
[0121] The key attribute item of the character type includes a pre-operation sub-attribute, and the pre-operation and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0122] The embodiment of the present invention can be executed by the client of the input method program. It can be understood that the embodiment of the present invention is for Figure 3 The specific execution subject of the method shown is not limited.
[0123] In step 301, the trigger key may refer to the key to be triggered. The trigger key may include: a character key or a function key (such as a Delete key, a Backspace key, etc.). When the trigger key is a character key, step 301 may be executed; it is understood that when the trigger key is not a character key, step 301 may not be executed.
[0124] The client of the input method program can download a configuration file from the server, and the configuration file can include: configured key attribute items. Of course, the configured key attribute items can also be stored in a storage structure such as a database.
[0125] In a specific implementation, the virtual key code of the trigger key can be searched in the above storage structure to obtain the key attribute item corresponding to the virtual key code of the trigger key. Specifically, the virtual key code of the trigger key can be matched with the virtual key code corresponding to the key attribute item.
[0126] In actual applications, it can be determined whether the virtual key code of the triggering key exists in the storage structure. If not, an unknown key can be returned; if so, at least one key attribute item can be obtained.
[0127] Step 302, matching the state information of the preceding operation with the sub-attributes of the key attribute item, and the corresponding matching result can be used to filter multiple key attribute items.
[0128] The above matching of the state information of the preceding operation with the sub-attributes of the key attribute item specifically includes:
[0129] Matching method 1: matching the state information of the preceding operation with the preceding operation sub-attribute of the key attribute item of the character type; and / or
[0130] Matching method 2: Match the state information of the pre-operation with the mode pre-operation sub-attribute of the key attribute item of the pre-operation type.
[0131] In actual applications, the status information of the preceding operation specifically includes:
[0132] The cache mode identifier; and / or
[0133] The activation state of the system modifier keys.
[0134] In a specific implementation, when the type of the target key attribute item is a preceding operation type, the processing method information may include: recording the status information of the preceding operation, thereby obtaining the status information of the preceding operation.
[0135] Wherein, when the target key attribute item is the key attribute item corresponding to the system modifier key, the activation state of the system modifier key can be recorded. For example, when the shift key is pressed, the target key attribute item can be considered to be the key attribute item corresponding to the shift key, and the activation state of the shift key can be recorded.
[0136] When the target key attribute item is a key attribute item corresponding to a mode, the corresponding mode identifier may be recorded in the cache.
[0137] The embodiment of the present invention does not limit the order of matching mode 1 and matching mode 2.
[0138] An implementation process of matching method 1 may include: matching the cached pattern identifier with the first pre-operation sub-attribute of the character type key attribute item to obtain a first key attribute item A that is successfully matched; further, the activation state of the system modifier key may be matched with the second pre-operation sub-attribute of the first key attribute item A to obtain a second key attribute item A that is successfully matched.
[0139] Another implementation process of matching method 1 may include: matching the activation state of the system modifier key with the second pre-operation sub-attribute of the character type key attribute item to obtain a first key attribute item B that is successfully matched; further, the cached mode identifier may be matched with the first pre-operation sub-attribute of the first key attribute item B to obtain a second key attribute item B that is successfully matched.
[0140] In the case that there are multiple types of state information of the preceding operation, the successfully matched target key attribute item includes: operation sub-attributes that match all the multiple types of state information.
[0141] The mode pre-operation sub-attribute specifically includes: a modifier sub-attribute and / or a mode sub-attribute. Matching mode 2 can perform matching corresponding to the modifier sub-attribute and / or the mode sub-attribute. When performing matching corresponding to the modifier sub-attribute and the mode sub-attribute, the embodiment of the present invention does not restrict the order of matching corresponding to the modifier sub-attribute and the mode sub-attribute.
[0142] The matching result of step 302 specifically includes: a successful match or a failed match. A successful match result can obtain a target key attribute item, and the type of the target key attribute item can be a character type or a pre-operation type. A failed match result will not be able to obtain the target key attribute item, in which case a prompt message indicating a failed match can be output.
[0143] It should be noted that, no matter the matching result is a successful match or a failed match, after obtaining the matching result, the existing pattern identifiers in the cache can be cleared. Specifically, if the matching result is a failed match, or the matching result is a successful match of a character type, the existing pattern identifiers in the cache can be cleared; or, if the matching result is a successful match of a preceding operation type, the existing pattern identifiers in the cache can be cleared, and the pattern identifiers corresponding to the preceding operation type that successfully matched can be cached.
[0144] In the case where the type of the target key attribute item is a character type, the processing mode information may further include: operation information corresponding to the operation sub-attribute of the target key attribute item, where the operation information is used to represent the operation corresponding to the mapped character.
[0145] The embodiment of the present invention may perform processing according to the operation information in the processing mode information.
[0146] According to an embodiment, the above-mentioned operation information may include: at least two operation items; the method may also include: displaying the at least two operation items to the user, and outputting the operation result corresponding to the target operation item to the user according to the target operation item selected by the user.
[0147] According to another embodiment, the above operation information includes: an operation item, and the above method may include: outputting the operation result corresponding to the operation item to the user.
[0148] Of course, the above processing method is only an optional embodiment. In fact, when the above operation information includes at least two operation items, the operation results corresponding to the at least two operation items can also be output to the user.
[0149] In order to enable those skilled in the art to better understand the embodiments of the present invention, the key processing process is described herein by taking the A key on a standard keyboard as a trigger key as an example.
[0150] In a specific implementation, the virtual key code 0x41 of the A key on the standard keyboard can be first searched in the configuration file to obtain a key attribute item set. Then, the mode identifier of the input method cache is matched with the first pre-operation sub-attribute of the key attribute item in the key attribute item set to obtain the first key attribute item A1; then, the activation state of the system modifier key is matched with the second pre-operation sub-attribute of the first key attribute item A to obtain the second key attribute item A that is successfully matched.
[0151] The number of the second key attribute item A can be 1, and the type can be a character type. The information corresponding to the mapping character sub-attribute char and the operation sub-attribute cop of the second key attribute item A can be used as processing method information and processed according to the processing method information.
[0152] Reference Figure 4 , shows a schematic diagram of a key processing result of an embodiment of the present invention, wherein the target string corresponding to the mapping character sub-attribute char corresponding to the standard keyboard A key can be displayed as a writing string; and the operation result corresponding to the operation sub-attribute cop corresponding to the standard keyboard A key can be displayed as a candidate. Wherein, when the operation sub-attribute cop is a word search, the operation result may include: a word starting with the target string.
[0153] In one embodiment of the present invention, if the type of the target key attribute item is a character type, and the target key attribute item matches the cached pattern identifier, it means that the cached pattern identifier has taken effect on subsequent keys as a preceding operation, so the pattern identifier in the cache that matches the target key attribute item can be deleted.
[0154] In summary, in the key processing method of the embodiment of the present invention, the character-type key attribute item includes a pre-operation sub-attribute, and the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key; thus, after determining the key attribute item corresponding to the virtual key code of the triggering key, the state information of the pre-operation is matched with the sub-attribute of the key attribute item, and the corresponding matching result can realize the recognition of the character-type key attribute item. Furthermore, for the character-type key attribute item, the mapping character corresponding to its mapping character sub-attribute can be used as the processing method information, thereby realizing the output of the mapping character.
[0155] Embodiment 4
[0156] Reference Figure 5 , shows a flowchart of a key processing method embodiment of the present invention, which may specifically include the following steps:
[0157] Step 501: Determine at least one key attribute item corresponding to the virtual key code of the trigger key;
[0158] Step 502: If the type of at least one key attribute item is a pre-operation type, the pre-operation state information is matched with the mode pre-operation sub-attribute of the key attribute item, and the mode identifier corresponding to the successfully matched key attribute item is cached.
[0159] The embodiment of the present invention can realize the recognition of key attribute items of the pre-operation type, and after completing the recognition of the key attribute items of the pre-operation type, cache the mode identifier corresponding to the recognized key attribute item to realize the recording of the status information of the pre-operation.
[0160] It should be noted that the mode pre-operation sub-attribute specifically includes: a modifier sub-attribute and / or a mode sub-attribute. Step 502 may perform a match corresponding to the modifier sub-attribute and / or the mode sub-attribute. When performing a match corresponding to the modifier sub-attribute and the mode sub-attribute, the embodiment of the present invention does not restrict the order of the match corresponding to the modifier sub-attribute and the mode sub-attribute.
[0161] In addition, it should be noted that after the key attribute item of the pre-operation type is identified, the existing mode identifier in the cache can be cleared. For example, before the matching of step 502 is performed, the existing mode identifier included in the cache is mode A. After the matching of step 502 is performed, the mode identifier corresponding to the key attribute item that successfully matches is mode B, so mode A in the cache can be cleared and mode B can be cached.
[0162] Embodiment 5
[0163] Reference Figure 6 , shows a flowchart of a key processing method embodiment of the present invention, which may specifically include the following steps:
[0164] Step 601: Determine a key attribute item corresponding to a virtual key code of a trigger key;
[0165] Step 602: Match the activation state of the system modifier key with the modifier key sub-attribute of the above key attribute item, and save the successfully matched key attribute item into a list;
[0166] The processing of the key attribute item of the preceding operation type in the list specifically includes: step 603 or step 604;
[0167] Step 603: If the key attribute item of the preceding operation type does not include the mode sub-attribute, or the mode sub-attribute in the key attribute item of the preceding operation type is empty, the key attribute item of the preceding operation type is used as the target key attribute item, the existing mode identifier in the cache is cleared, and the mode identifier corresponding to the target key attribute item is cached;
[0168] Step 604: if the mode sub-attribute in the key attribute item of the preceding operation type is not empty, the cached mode identifier is matched with the mode sub-attribute in the key attribute item of the preceding operation type. If the match is successful, the existing mode identifier in the cache is cleared, and the mode identifier corresponding to the successfully matched target key attribute item is cached;
[0169] The processing of the key attribute items of the character type in the list specifically includes:
[0170] Step 605: If the key attribute item of the character type does not include the mode sub-attribute, or the mode sub-attribute in the key attribute item of the character type is empty, the key attribute item of the character type is used as the target key attribute item, and the information corresponding to the mapping character sub-attribute char and the operation sub-attribute cop of the target key attribute item is used as the processing mode information, and the processing is performed according to the processing mode information, and the existing mode identifier in the cache is cleared;
[0171] Step 606: If the mode sub-attribute in the key attribute item of the character type is not empty, the cached mode identifier is matched with the first preceding operation sub-attribute of the key attribute item of the character type to obtain a successfully matched target key attribute item, and the information corresponding to the mapped character sub-attribute char and the operation sub-attribute cop of the target key attribute item is used as processing method information, and processing is performed according to the processing method information, and the existing mode identifier in the cache is cleared.
[0172] Based on step 603 or step 604 or step 605 or step 606, a target key attribute item and its corresponding processing method information can be obtained, and processing is performed according to the processing method information, thereby realizing recognition and processing of the key attribute item.
[0173] It should be noted that, in a specific implementation, the matching results obtained in step 603 or step 604 or step 605 or step 606 may all be matching failures. In this case, the target key attribute item cannot be obtained, so a prompt message of matching failure can be output.
[0174] It should be noted that, for the method embodiments, for the sake of simplicity of description, they are all described as a series of motion action combinations, but those skilled in the art should know that the embodiments of the present invention are not limited by the order of the described motion actions, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the motion actions involved are not necessarily required by the embodiments of the present invention.
[0175] Device Embodiment
[0176] Reference Figure 7 , shows a structural block diagram of an embodiment of a key processing device of the present invention, which may specifically include:
[0177] The receiving module 701 is used to receive the configured key attribute items; the key attribute items mentioned above; and
[0178] The storage module 702 is used to store the configured key attribute items.
[0179] Reference Figure 8 , shows a structural block diagram of an embodiment of a key processing device of the present invention, which may specifically include:
[0180] A key attribute item determination module 801 is used to determine a key attribute item corresponding to a virtual key code of a triggering key;
[0181] A matching module 802, configured to match the state information of the preceding operation with the sub-attributes of the above-mentioned key attribute items; and
[0182] The processing mode determination module 803 is used to determine the corresponding processing mode information for the successfully matched target key attribute item; if the type of the target key attribute item is a character type, the processing mode information includes: the mapping character corresponding to the mapping character sub-attribute of the target key attribute item;
[0183] The key attribute item of the above character type includes a pre-operation sub-attribute, and the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0184] Optionally, the matching module 802 may include:
[0185] A first matching module is used to match the state information of the preceding operation with the preceding operation sub-attribute of the key attribute item of the character type; and / or
[0186] The second matching module is used to match the state information of the pre-operation with the mode pre-operation sub-attribute of the key attribute item of the pre-operation type.
[0187] Optionally, the status information of the preceding operation may include:
[0188] The cache mode identifier; and / or
[0189] The activation state of the system modifier keys.
[0190] Optionally, if the type of the target key attribute item is a character type, the processing method information may further include: operation information corresponding to the operation sub-attribute of the target key attribute item.
[0191] Optionally, the above operation information may include: at least two operation items;
[0192] The above device may also include:
[0193] The first processing module is used to display the at least two operation items mentioned above to the user, and output the operation result corresponding to the target operation item to the user according to the target operation item selected by the user.
[0194] Optionally, the above operation information may include: an operation item;
[0195] The above device may also include:
[0196] The second processing module is used to output the operation result corresponding to the above operation item to the user.
[0197] Optionally, the type of the target button attribute item is a pre-operation type, and the processing method information may include: recording status information of the pre-operation.
[0198] Reference Fig. 9 , shows a structural block diagram of an embodiment of a key processing device of the present invention, which may specifically include: a key control module 901, a character mapping module 902 and a query control module 903.
[0199] Among them, the key control module 901 is used to receive the virtual key code of the trigger key, and if the virtual key code corresponds to the character class, the virtual key code is sent to the character mapping module 902, and the processing method information (including mapping characters and operation information) returned by the character mapping module 902 is received, and according to the processing method information, the query candidate or the screen operation is triggered. If it does not correspond to the character class, the preset operation of the input method can be executed.
[0200] The character mapping module 902 is used to receive the virtual key code sent by the key control module 901, and determine the target key attribute item and processing method information corresponding to the virtual key code according to the storage structure of the key attribute item. The character mapping module 902 specifically includes: a key attribute item determination module 921, a matching module 922 and a processing method determination module 923, for details, refer to Figure 8 The modules shown.
[0201] The query candidate module 903 is used to query the word candidates corresponding to the mapped characters and return the query results to the key control module 901.
[0202] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0203] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0204] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0205] Fig.10 1 is a block diagram of a device 1300 for key processing according to an exemplary embodiment. For example, the device 1300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0206] Reference Fig.10 , the device 1300 may include one or more of the following components: a processing component 1302 , a memory 1304 , a power component 1306 , a multimedia component 1308 , an audio component 1310 , an input / output (I / O) interface 1312 , a sensor component 1314 , and a communication component 1316 .
[0207] The processing component 1302 generally controls the overall operation of the device 1300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1302 may include one or more processors 1320 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 1302 may include one or more modules to facilitate interaction between the processing component 1302 and other components. For example, the processing component 1302 may include a multimedia module to facilitate interaction between the multimedia component 1308 and the processing component 1302.
[0208] The memory 1304 is configured to store various types of data to support operations on the device 1300. Examples of such data include instructions for any application or method operating on the device 1300, contact data, phone book data, messages, pictures, videos, etc. The memory 1304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0209] The power supply component 1306 provides power to the various components of the device 1300. The power supply component 1306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1300.
[0210] The multimedia component 1308 includes a screen that provides an output interface between the device 1300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide motion action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1308 includes a front camera and / or a rear camera. When the device 1300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0211] The audio component 1310 is configured to output and / or input audio signals. For example, the audio component 1310 includes a microphone (MIC), and when the device 1300 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1304 or sent via the communication component 1316. In some embodiments, the audio component 1310 also includes a speaker for outputting audio signals.
[0212] I / O interface 1312 provides an interface between processing component 1302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0213] The sensor assembly 1314 includes one or more sensors for providing various aspects of the status assessment of the device 1300. For example, the sensor assembly 1314 can detect the open / closed state of the device 1300, the relative positioning of components, such as the display and keypad of the device 1300, the sensor assembly 1314 can also detect the position change of the device 1300 or a component of the device 1300, the presence or absence of user contact with the device 1300, the orientation or acceleration / deceleration of the device 1300, and the temperature change of the device 1300. The sensor assembly 1314 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1314 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1314 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0214] The communication component 1316 is configured to facilitate wired or wireless communication between the device 1300 and other devices. The device 1300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0215] In an exemplary embodiment, the device 1300 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned methods.
[0216] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1304 including instructions, and the instructions can be executed by the processor 1320 of the device 1300 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0217] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by the processor of an intelligent terminal, enables the intelligent terminal to execute a key processing method, the method comprising: determining a key attribute item corresponding to a virtual key code that triggers a key; matching the state information of a preceding operation with the sub-attribute of the key attribute item; determining corresponding processing method information for a successfully matched target key attribute item; if the type of the target key attribute item is a character type, the processing method information comprises: a mapping character corresponding to a mapping character sub-attribute of the target key attribute item; wherein the key attribute item of the character type comprises a preceding operation sub-attribute, and the preceding operation corresponding to the preceding operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0218] Fig.11 1 is a schematic diagram of the structure of the server in an embodiment of the present invention. The server 1900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1922 (for example, one or more processors) and memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) storing application programs 1942 or data 1944. Among them, the memory 1932 and the storage medium 1930 can be short-term storage or permanent storage. The program stored in the storage medium 1930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 1922 can be configured to communicate with the storage medium 1930 and execute a series of instruction operations in the storage medium 1930 on the server 1900.
[0219] The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958, one or more keyboards 1956, and / or, one or more operating systems 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0220] Those skilled in the art will readily appreciate other embodiments of the invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0221] It should be understood that the present invention is not limited to the precise structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
[0222] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
[0223] The embodiment of the present invention discloses A1, a key attribute item, including: a key attribute item of a character type;
[0224] The key attribute items of the character type correspond to the virtual key code of the key, including:
[0225] The mapped character sub-attribute represents the mapped character corresponding to the key; and
[0226] Prefix operation sub-attribute; wherein, the prefix operation corresponding to the prefix operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0227] A2. According to the key attribute item described in A1, the pre-operation sub-attribute includes:
[0228] The first preceding operation sub-attribute includes: a mode identifier for caching; and / or
[0229] The second front operation sub-attribute includes: a virtual key code corresponding to a system modifier key for recording an activation state.
[0230] A3. According to the key attribute items described in A1, the key attribute items further include: a key attribute item of a pre-operation type.
[0231] A4. According to the key attribute item described in A3, the key attribute item of the pre-operation type includes: an identification sub-attribute representing a mode identifier used for caching.
[0232] A5. According to the key attribute item described in A4, the key attribute item of the pre-operation type further includes: a mode pre-operation sub-attribute, which represents the pre-operation corresponding to the mode.
[0233] A6. According to the key attribute items described in A1, the key attribute items of the character type further include:
[0234] The operation sub-attribute represents the operation information corresponding to the mapping character.
[0235] The embodiment of the present invention discloses B7, a key processing method, comprising:
[0236] Receive a configured key attribute item; the key attribute item is any key attribute item described in A1 to A6;
[0237] Stores the configured key attribute items.
[0238] The embodiment of the present invention discloses C8, a key processing method, comprising:
[0239] Determine the key attribute item corresponding to the virtual key code of the trigger key;
[0240] Matching the state information of the preceding operation with the sub-attributes of the key attribute item;
[0241] For the successfully matched target key attribute item, the corresponding processing method information is determined; if the type of the target key attribute item is a character type, the processing method information includes: the mapping character corresponding to the mapping character sub-attribute of the target key attribute item;
[0242] The key attribute item of the character type includes a pre-operation sub-attribute, and the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0243] C9. The method according to C8, wherein the matching of the state information of the preceding operation with the sub-attribute of the key attribute item comprises:
[0244] Matching the state information of the preceding operation with the preceding operation sub-attribute of the key attribute item of the character type; and / or
[0245] The state information of the preceding operation is matched with the mode preceding operation sub-attribute of the key attribute item of the preceding operation type.
[0246] C10. According to the method described in C8, the status information of the preceding operation includes:
[0247] The cache mode identifier; and / or
[0248] The activation state of the system modifier keys.
[0249] C11. According to the method described in C8, if the type of the target key attribute item is a character type, the processing mode information further includes: operation information corresponding to the operation sub-attribute of the target key attribute item.
[0250] C12. The method according to C11, wherein the operation information includes: at least two operation items;
[0251] The method further comprises:
[0252] The at least two operation items are displayed to the user, and according to the target operation item selected by the user, the operation result corresponding to the target operation item is output to the user.
[0253] C13. The method according to C11, wherein the operation information includes: an operation item;
[0254] The method further comprises:
[0255] The operation result corresponding to the operation item is output to the user.
[0256] C14. According to the method described in C8, the type of the target key attribute item is a pre-operation type, and the processing method information includes: recording the status information of the pre-operation.
[0257] The embodiment of the present invention discloses D15, a key processing device, comprising:
[0258] A receiving module, used for receiving a configured key attribute item; the key attribute item is any one of the key attribute items A1 to A6; and
[0259] The storage module is used to store the configured key attribute items.
[0260] The embodiment of the present invention discloses E16, a key processing device, including:
[0261] A key attribute item determination module, used to determine a key attribute item corresponding to a virtual key code of a triggering key;
[0262] a matching module, used to match the state information of the preceding operation with the sub-attributes of the key attribute item; and
[0263] The processing mode determination module is used to determine the corresponding processing mode information for the successfully matched target key attribute item; if the type of the target key attribute item is a character type, the processing mode information includes: the mapping character corresponding to the mapping character sub-attribute of the target key attribute item;
[0264] The key attribute item of the character type includes a pre-operation sub-attribute, and the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0265] E17. According to the apparatus of E16, the matching module comprises:
[0266] A first matching module is used to match the state information of the preceding operation with the preceding operation sub-attribute of the key attribute item of the character type; and / or
[0267] The second matching module is used to match the state information of the pre-operation with the mode pre-operation sub-attribute of the key attribute item of the pre-operation type.
[0268] E18. According to the apparatus of E16, the status information of the preceding operation comprises:
[0269] The cache mode identifier; and / or
[0270] The activation state of the system modifier keys.
[0271] E19. According to the device described in E16, if the type of the target key attribute item is a character type, the processing method information further includes: operation information corresponding to the operation sub-attribute of the target key attribute item.
[0272] E20. The apparatus according to E19, wherein the operation information comprises: at least two operation items;
[0273] The device also includes:
[0274] The first processing module is used to display the at least two operation items to the user, and output the operation result corresponding to the target operation item to the user according to the target operation item selected by the user.
[0275] E21. The apparatus according to E19, wherein the operation information comprises: an operation item;
[0276] The device also includes:
[0277] The second processing module is used to output the operation result corresponding to the operation item to the user.
[0278] E22. According to the device described in E16, the type of the target button attribute item is a pre-operation type, and the processing method information includes: recording status information of the pre-operation.
[0279] The embodiment of the present invention discloses F23, a device for key processing, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations:
[0280] Receive a configured key attribute item; the key attribute item is any key attribute item described in A1 to A6;
[0281] Stores the configured key attribute items.
[0282] The embodiment of the present invention discloses G24, a device for key processing, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations:
[0283] Determine the key attribute item corresponding to the virtual key code of the trigger key;
[0284] Matching the state information of the preceding operation with the sub-attributes of the key attribute item;
[0285] For the successfully matched target key attribute item, the corresponding processing method information is determined; if the type of the target key attribute item is a character type, the processing method information includes: the mapping character corresponding to the mapping character sub-attribute of the target key attribute item;
[0286] The key attribute item of the character type includes a pre-operation sub-attribute, and the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key.
[0287] G25. According to the apparatus of G24, the matching of the state information of the preceding operation with the sub-attribute of the key attribute item comprises:
[0288] Matching the state information of the preceding operation with the preceding operation sub-attribute of the key attribute item of the character type; and / or
[0289] The state information of the preceding operation is matched with the mode preceding operation sub-attribute of the key attribute item of the preceding operation type.
[0290] G26. According to the device described in G24, the status information of the pre-operation includes:
[0291] The cache mode identifier; and / or
[0292] The activation state of the system modifier keys.
[0293] G27. According to the device described in G24, if the type of the target key attribute item is a character type, the processing method information also includes: operation information corresponding to the operation sub-attribute of the target key attribute item.
[0294] G28. According to the device of G27, the operation information includes: at least two operation items;
[0295] The device is also configured to execute, by one or more processors, the one or more programs including instructions for performing the following operations:
[0296] The at least two operation items are displayed to the user, and according to the target operation item selected by the user, the operation result corresponding to the target operation item is output to the user.
[0297] G29. According to the device described in G27, the operation information includes: an operation item;
[0298] The device is also configured to execute, by one or more processors, the one or more programs including instructions for performing the following operations:
[0299] The operation result corresponding to the operation item is output to the user.
[0300] G30. According to the device described in G24, the type of the target button attribute item is a pre-operation type, and the processing method information includes: recording the status information of the pre-operation.
[0301] An embodiment of the present invention discloses H31, one or more machine-readable media, on which instructions are stored, which, when executed by one or more processors, enable the device to execute the method described in B7.
[0302] An embodiment of the present invention discloses I32, one or more machine-readable media having instructions stored thereon, which, when executed by one or more processors, cause the device to execute one or more of the methods described in C8 to C14.
[0303] The above is a detailed introduction to a key attribute item, a key processing method, a key processing device and a device for key processing provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A key processing method, characterized in that: include: Receive the configured key attribute items; The key attribute items include: key attribute items of character type; The key attribute items of the character type correspond to the virtual key code of the key, including: The mapped character sub-attribute represents the mapped character corresponding to the key; and Pre-operation sub-attribute; wherein the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key; Store the configured key attribute items; The key attribute items also include: key attribute items of the pre-operation type; The key attribute item of the pre-operation type includes: an identification sub-attribute representing a mode identifier used for caching.
2. The method according to claim 1, characterized in that The pre-operation sub-attributes include: The first preceding operation sub-attribute includes: a mode identifier for caching; and / or The second front operation sub-attribute includes: a virtual key code corresponding to a system modifier key for recording an activation state.
3. The method according to claim 1, characterized in that: The key attribute item of the pre-operation type further includes: a mode pre-operation sub-attribute, which represents the pre-operation corresponding to the mode.
4. The method according to claim 1, characterized in that: The key attribute items of the character type also include: The operation sub-attribute represents the operation information corresponding to the mapping character.
5. A key processing method, characterized in that: include: Determine the key attribute item corresponding to the virtual key code of the trigger key; Matching the state information of the preceding operation with the sub-attributes of the key attribute item; Determine the corresponding processing method information for the successfully matched target key attribute item; If the type of the target key attribute item is a character type, the processing mode information includes: a mapping character corresponding to the mapping character sub-attribute of the target key attribute item; The key attribute item of the character type includes a pre-operation sub-attribute, and the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key; The method further comprises: If the type of the target key attribute item is a pre-operation type, the processing method information includes: recording the state information of the pre-operation, wherein the key attribute item of the pre-operation type includes a key attribute item corresponding to a mode, and the state information of the pre-operation includes a cached mode identifier; Wherein, in the case where the target key attribute item is the key attribute item corresponding to the mode, the mode identifier corresponding to the target key attribute item is recorded in the cache; If the type of the target key attribute item is a character type, and the target key attribute item matches the mode identifier recorded in the cache, the mode identifier recorded in the cache is used as a pre-operation to take effect on subsequent keys.
6. The method according to claim 5, characterized in that The matching of the state information of the preceding operation with the sub-attribute of the key attribute item includes: Matching the state information of the preceding operation with the preceding operation sub-attribute of the key attribute item of the character type; and / or The state information of the preceding operation is matched with the mode preceding operation sub-attribute of the key attribute item of the preceding operation type.
7. The method according to claim 5, characterized in that The status information of the preceding operation includes: The cache mode identifier; and / or The activation state of the system modifier keys.
8. The method according to claim 5, characterized in that If the type of the target key attribute item is a character type, the processing mode information further includes: operation information corresponding to the operation sub-attribute of the target key attribute item.
9. The method according to claim 8, characterized in that The operation information includes: at least two operation items; The method further comprises: The at least two operation items are displayed to the user, and according to the target operation item selected by the user, the operation result corresponding to the target operation item is output to the user.
10. The method according to claim 8, characterized in that The operation information includes: an operation item; The method further comprises: The operation result corresponding to the operation item is output to the user.
11. A key processing device, characterized in that: include: A receiving module, used for receiving configured key attribute items; The key attribute items include: key attribute items of character type; The key attribute items of the character type correspond to the virtual key code of the key, including: The mapped character sub-attribute represents the mapped character corresponding to the key; and A pre-operation sub-attribute; wherein the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key; and A storage module, used to store configured key attribute items; The key attribute items also include: key attribute items of the pre-operation type; The key attribute item of the pre-operation type includes: an identification sub-attribute representing a mode identifier used for caching.
12. The device according to claim 11, characterized in that The pre-operation sub-attributes include: The first preceding operation sub-attribute includes: a mode identifier for caching; and / or The second front operation sub-attribute includes: a virtual key code corresponding to a system modifier key for recording an activation state.
13. The device according to claim 11, characterized in that The key attribute item of the pre-operation type further includes: a mode pre-operation sub-attribute, which represents the pre-operation corresponding to the mode.
14. The device according to claim 11, characterized in that The key attribute items of the character type also include: The operation sub-attribute represents the operation information corresponding to the mapping character.
15. A key processing device, characterized in that: include: A key attribute item determination module, used to determine a key attribute item corresponding to a virtual key code of a triggering key; A matching module, used for matching the state information of the preceding operation with the sub-attributes of the key attribute item; as well as A processing method determination module is used to determine corresponding processing method information for a successfully matched target key attribute item; If the type of the target key attribute item is a character type, the processing mode information includes: a mapping character corresponding to the mapping character sub-attribute of the target key attribute item; The key attribute item of the character type includes a pre-operation sub-attribute, and the pre-operation corresponding to the pre-operation sub-attribute and the virtual key code of the key are used to jointly determine the mapping character corresponding to the key; The device also includes: If the type of the target key attribute item is a pre-operation type, the processing method information includes: recording the state information of the pre-operation, wherein the key attribute item of the pre-operation type includes a key attribute item corresponding to a mode, and the state information of the pre-operation includes a cached mode identifier; Wherein, in the case where the target key attribute item is the key attribute item corresponding to the mode, the mode identifier corresponding to the target key attribute item is recorded in the cache; If the type of the target key attribute item is a character type, and the target key attribute item matches the mode identifier recorded in the cache, the mode identifier recorded in the cache is used as a pre-operation to take effect on subsequent keys.
16. The device according to claim 15, characterized in that The matching module comprises: A first matching module is used to match the state information of the preceding operation with the preceding operation sub-attribute of the key attribute item of the character type; and / or The second matching module is used to match the state information of the pre-operation with the mode pre-operation sub-attribute of the key attribute item of the pre-operation type.
17. The device according to claim 15, characterized in that The status information of the preceding operation includes: The cache mode identifier; and / or The activation state of the system modifier keys.
18. The device according to claim 15, characterized in that If the type of the target key attribute item is a character type, the processing mode information further includes: operation information corresponding to the operation sub-attribute of the target key attribute item.
19. The device according to claim 18, characterized in that The operation information includes: at least two operation items; The device also includes: The first processing module is used to display the at least two operation items to the user, and output the operation result corresponding to the target operation item to the user according to the target operation item selected by the user.
20. The device according to claim 18, characterized in that The operation information includes: an operation item; The device also includes: The second processing module is used to output the operation result corresponding to the operation item to the user.
21. A device for key processing, characterized in that: The invention comprises a memory and one or more programs, wherein the one or more programs are stored in the memory, and when the programs are executed by one or more processors, the steps of the method described in any one of claims 1 to 10 are implemented.
22. One or more machine-readable media, characterized in that Instructions are stored thereon, which, when executed by one or more processors, cause the apparatus to perform the method as claimed in any one of claims 1 to 10.
Citation Information
Patent Citations
Keyboard and character information processing system using multi function key
KR1020080085669A