Web-side shortcut key implementation method, system and device
By monitoring shortcut key events and judging system status, combined with shortcut key configuration information, the reuse and customization of shortcut keys in Web pages are realized, which solves the shortcomings of traditional shortcut key setting methods and improves the shortcut key operation experience on complex Web pages. and user customization capabilities.
Patent Information
- Application Number
- CN202410726334.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-06
AI Technical Summary
In complex Web pages, traditional shortcut key setting methods cannot meet complex functional requirements, shortcut keys are inconvenient to operate, and users cannot customize or modify shortcut keys, resulting in functional conflicts and inconvenience.
By monitoring shortcut key trigger events, the current system status is determined, and the shortcut key configuration information is used to perform corresponding functions to realize the reuse and customization of shortcut keys, support users to modify shortcut keys, provide shortcut key configuration interfaces and interfaces, and allow users to customize Shortcut key function.
It simplifies the triggering process of shortcut keys, realizes the reuse and user customization of shortcut keys, solves the problem of shortcut key setting methods being unable to meet complex Web functions and inconvenient operations, and improves user experience and flexibility.
Smart Images

Figure CN118295577B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and in particular, relates to a method, system and device for implementing shortcut keys on a Web terminal. Background Art
[0002] Currently, complex applications running on web pages usually provide shortcut keys so that experienced users can
[0003] The shortcut keys can also be named as quick keys or hot keys, which refer to the use of certain specific keys, key sequences or key combinations to control the application to complete the operation corresponding to a shortcut function.
[0004] However, in the implementation and use of web-side shortcut keys, when a system function is too complex, the current traditional shortcut key setting method cannot meet the complex functions, or the shortcut keys are not easy to operate and use after implementation.
[0005] Therefore, there is an urgent need for a systematic solution that can meet the complex shortcut keys of web pages.
[0006] The above statements are only used to provide background technical information related to the present application. Unless otherwise stated herein, the contents described in this section are not prior art for the contents of other parts of the present application. Summary of the invention
[0007] The present invention proposes a method, system and device for implementing Web-side shortcut keys. After the application detects a shortcut key triggering event, it first determines the current system state and then determines the corresponding key function, so that functions in different system states can be triggered by the same key or key combination, which greatly simplifies the shortcut key triggering process and realizes the reuse of shortcut keys.
[0008] In addition, this application realizes one-key reuse of multiple functions through the custom shortcut key function, which greatly simplifies the triggering of shortcut keys; at the same time, this application supports users to modify shortcut keys, realizing user customization and flexibility. This application solves the problem that the current shortcut key setting method cannot meet the needs of complex web functions and the shortcut keys are not easy to operate to a certain extent.
[0009] According to a first aspect of an embodiment of the present application, a method for implementing a shortcut key on a Web side is provided, including:
[0010] Listen for keyboard events at the root node of the entire page;
[0011] Detect the triggered target keyboard event, find the target shortcut key or target key combination used by the user through the event event, and identify the current system state;
[0012] The target shortcut key or target key combination in the current system state is searched through the shortcut key configuration information, and the key function corresponding to the target shortcut key or target key combination is executed.
[0013] In some implementations of the present application, the system further includes: the user modifies the shortcut key or key combination bound to the keyboard event through a shortcut key configuration file.
[0014] In some implementations of the present application, the user modifies the shortcut key or key combination bound to the keyboard event through the shortcut key configuration file, including:
[0015] The web server transmits the shortcut key configuration file to the user through the download interface;
[0016] The user modifies the shortcut key or target key combination bound to the keyboard event and returns the new shortcut key configuration file;
[0017] The web server receives the new shortcut key configuration file and updates it.
[0018] In some implementations of the present application, the user modifies the shortcut key or key combination bound to the keyboard event through the shortcut key configuration file, including:
[0019] Provide users with shortcut key configuration interface;
[0020] The user modifies the shortcut key or key combination bound to the keyboard event through the shortcut key configuration interface, obtains a new shortcut key configuration file and updates it.
[0021] In some implementations of the present application, the user modifies the shortcut key or key combination bound to the keyboard event through the shortcut key configuration file, including:
[0022] The user connects to the Web server and searches for the shortcut key configuration file;
[0023] The user modifies the shortcut key or target key combination bound to a keyboard event and updates the shortcut key configuration file.
[0024] In some implementations of the present application, the method further includes: a user customizes a key function corresponding to a shortcut key or a key combination.
[0025] In some embodiments of the present application, the key functions corresponding to the user-defined shortcut keys or key combinations include:
[0026] Receive key function modification instructions;
[0027] Record the user's current operations, execution sequence, and system status, and generate record files;
[0028] Receive modification completion instructions and use the record file as a user-defined function;
[0029] Set shortcut keys or key combinations corresponding to user-defined functions and update shortcut key configuration files.
[0030] In some implementations of the present application, searching for a target shortcut key or a target key combination in the current system state through shortcut key configuration information, and executing a key function corresponding to the target shortcut key or the target key combination, includes:
[0031] If there is no corresponding target shortcut key or target key combination in the current system state, then find out whether the previous page node is bound to the target shortcut key or target key combination until the page root node.
[0032] In some implementations of the present application, the method further includes: presetting the system state to include a global state, an edit form state, and an edit control state;
[0033] The basic functions for setting global status include finding a form, opening a form, deleting a form, creating a new form, and editing a form;
[0034] The form functions for setting the edit form state include adding records, deleting records, modifying records, and saving modifications;
[0035] Form features that set the state of the edit control include the search control available options, the next control, and the previous control.
[0036] According to a second aspect of an embodiment of the present application, a web-side shortcut key implementation system is provided, including:
[0037] Keyboard event monitoring module: used to monitor keyboard events at the root node of the entire page;
[0038] Shortcut key confirmation module: used to detect the triggered target keyboard event, find the target shortcut key or target key combination used by the user through the event event, and identify the current system state;
[0039] Key function implementation module: used to find the target shortcut key or target key combination in the current system state through the shortcut key configuration information, and execute the key function corresponding to the target shortcut key or target key combination.
[0040] According to the third aspect of the embodiment of the present application, a shortcut key implementation device is provided, including: a storage unit for storing executable instructions; and a processing unit for connecting to the device to execute the executable instructions to complete the Web-side shortcut key implementation method.
[0041] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored; the computer program is executed by a processor to implement a method for implementing a Web-side shortcut key.
[0042] The method, system and device for implementing shortcut keys on the Web side of the present application are adopted, by monitoring keyboard events at the root node of the entire page; detecting the triggered target keyboard event, searching for the target shortcut key or target key combination used by the user through the event event, and identifying the current system state; searching for the target shortcut key or target key combination under the current system state through the shortcut key configuration information, and executing the key function corresponding to the target shortcut key or target key combination. The present application is aimed at complex Web pages with many functions, many shortcut keys, and many and complex key combinations. After monitoring the shortcut key triggering event, the current system state is first determined, and then the corresponding key function is determined, so that functions in different states of the system can be triggered by the same key or key combination, which greatly simplifies the shortcut key triggering process and realizes the reuse of shortcut keys. The present application predefines which states the system can be in and which functions are required for each state.
[0043] In addition, this application realizes one-key reuse of multiple functions through the custom shortcut key function, which greatly simplifies the triggering of shortcut keys; at the same time, this application supports users to modify shortcut keys, realizing user customization and flexibility. This application solves the problem that the current shortcut key setting method cannot meet the needs of complex web functions and the shortcut keys are not easy to operate to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0045] Figure 1 The existing traditional web shortcut key implementation method is shown in FIG.
[0046] Figure 2 A schematic diagram of the steps of a method for implementing a shortcut key on a Web terminal according to an embodiment of the present application is shown in FIG.
[0047] Figure 3 A principle flow chart of a method for implementing a shortcut key on a Web terminal according to an embodiment of the present application is shown in FIG.
[0048] Figure 4 : shows a schematic diagram of preferred implementation steps of a method for implementing a shortcut key on a Web side according to an embodiment of the present application;
[0049] Figure 5 : shows another preferred implementation step schematic diagram of the method for implementing a shortcut key on the Web side according to an embodiment of the present application;
[0050] Figure 6 A principle flow chart of key functions corresponding to custom shortcut keys or key combinations according to an embodiment of the present application is shown in FIG.
[0051] Figure 7 Another principle flow chart of the method for implementing a shortcut key on the Web side according to an embodiment of the present application is shown in FIG.
[0052] Figure 8 A structural diagram of a system for implementing shortcut keys on a Web-side according to an embodiment of the present application is shown in FIG.
[0053] Fig. 9 Detailed description of the structure of the device for implementing shortcut keys according to an embodiment of the present application is shown in FIG. DETAILED DESCRIPTION
[0054] Regarding this application, the developers select frequently used functions from the functions implemented in the system, and correspond these functions to key combinations one by one. Generally, one key or key combination can only correspond to one function.
[0055] There are several ways for developers to implement traditional shortcuts:
[0056] like Figure 1 As shown in the figure, the first method of implementing traditional web shortcut keys is to listen to keyboard events and find the key combinations used by users. For example, for Ctrl+C, set a series of restrictions or branches in the code, find the corresponding functions, and then implement the corresponding functions. In this way of setting shortcut keys, a page can only execute one set of shortcut key rules. Generally speaking, a shortcut key combination, such as Ctrl+C, can only correspond to one function. When a page is composed of several components, the shortcut keys between components cannot be repeated, otherwise one shortcut key may be triggered to execute two functions, or even the two functions may interfere with each other. Therefore, this method can easily cause functional conflicts of shortcut keys, which brings inconvenience to users.
[0057] The second traditional method to implement web shortcut keys is to bind an event to a certain page element. When the focus (or the page activeElement element) is on this element, tapping the keyboard will trigger the bound event and execute the corresponding function. This method of implementing shortcut keys also has disadvantages. The focus of the current page must be on the bound shortcut key to trigger the keyboard event. If the element bound to the event loses focus, the shortcut key will be invalid. You must manually click the bound element or use code (focus) to return the focus to the bound element. Therefore, this method is prone to cause focus loss and failure of the trigger function.
[0058] In addition, the above two shortcut key setting methods have the following disadvantages: these two methods are generally set during the development period, and the shortcut key combination is designed by the developer, which may not be consistent with the user's usage habits. If you want to modify the shortcut key settings, the developer needs to modify the code, which is very inconvenient.
[0059] In summary, the setting and implementation of traditional shortcut keys have the following technical problems:
[0060] 1) When faced with complex pages with many functions, the shortcut keys are complex to set, the number is large, the key combinations are many, and the shortcut keys conflict and fail, which is very inconvenient for users.
[0061] 2) The shortcut key settings can only be modified by the developer by modifying the code, which is very inconvenient for users to modify the shortcut keys.
[0062] 3) After development is completed, it is impossible to increase or decrease the functional operations bound to shortcut keys, and it is difficult for users to customize new functions.
[0063] Based on the above considerations, the present application can greatly simplify the triggering of shortcut keys, and most functions can be implemented with just one key; it can also realize key reuse, and one key or key combination can correspond to multiple functions in different states.
[0064] Through this application, users can modify the default configuration and use keys they are familiar with to trigger functions, which is more in line with user habits.
[0065] Users can also highly customize shortcut keys, which are not limited to the functions defined by developers, and do not require developers to modify the original code, greatly increasing the user customization and flexibility of shortcut key functions.
[0066] This application solves to a certain extent the problem that the current shortcut key setting method cannot meet the needs of complex web functions and the shortcut keys are not easy to operate and use.
[0067] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0068] Example 1
[0069] Figure 2 A schematic diagram of the steps of the method for implementing a Web-side shortcut key according to an embodiment of the present application is shown in FIG.
[0070] like Figure 2 As shown, the method for implementing the shortcut key on the Web side of the embodiment of the present application includes the following steps:
[0071] S1: Listen for keyboard events at the root node of the entire page.
[0072] In specific implementation, global events are listened through document.addEventListener event.
[0073] S2: Detect the triggered target keyboard event, find the target shortcut key or target key combination used by the user through the event event, and identify the current system state;
[0074] S3: searching for a target shortcut key or a target key combination in the current system state through the shortcut key configuration information, and executing a key function corresponding to the target shortcut key or the target key combination.
[0075] This application is aimed at complex Web pages with numerous functions, many shortcut keys, and many complex key combinations. After detecting a shortcut key trigger event, it first determines the current system state and then determines the corresponding key function, so that functions in different system states can be triggered with the same key or key combination, which greatly simplifies the shortcut key triggering process and realizes the reuse of shortcut keys.
[0076] The method of the present application also includes: presetting the system status including the global status, the edit form status and the edit control status.
[0077] Among them, the basic functions of setting the global state include finding a form, opening a form, deleting a form, creating a new form, and editing a form;
[0078] The form functions for setting the edit form state include adding records, deleting records, modifying records, and saving modifications;
[0079] Form features that set the state of the edit control include the search control available options, the next control, and the previous control.
[0080] To further illustrate, this application predefines which states the system can be in and which functions are required for each state. And this application provides a method for calling basic functions, and the shortcut keys match the basic functions one by one. In the same state, a key or key combination can only correspond to one function. Functions in different states can be triggered by the same key or key combination to set the monitoring event globally. Regardless of the current state of the system, tapping the keyboard triggers the same set of shortcut keys.
[0081] Figure 3 The principle flow chart of the method for implementing the Web-side shortcut keys according to an embodiment of the present application is shown in FIG.
[0082] like Figure 3 As shown, when the global monitor detects the user's keyboard events, the system first needs to identify the current state; then, based on the state, it searches the shortcut key configuration information to see if there is a function that matches the keyboard event in the current state. If so, it executes the corresponding function.
[0083] Figure 4A schematic diagram of preferred implementation steps of the method for implementing shortcut keys on the Web side according to an embodiment of the present application is shown in FIG.
[0084] like Figure 4 As shown, in the preferred embodiment, the system further comprises S4: the user modifies the shortcut key or key combination bound to the keyboard event through the shortcut key configuration file. The shortcut key configuration file is stored on the server side, providing the user with a method for modifying the shortcut key configuration.
[0085] In specific implementation, users modify the shortcut keys or key combinations bound to keyboard events through the shortcut key configuration file, including the following three methods:
[0086] Method 1: First, the Web server transmits the shortcut key configuration file to the user through the download interface; then, the user modifies the shortcut key or target key combination bound to the keyboard event and returns a new shortcut key configuration file; finally, the Web server receives the new shortcut key configuration file and updates it.
[0087] Method 2: First, provide the user with a shortcut key configuration interface; then, the user modifies the shortcut key or key combination bound to the keyboard event through the shortcut key configuration interface, obtains a new shortcut key configuration file and updates it.
[0088] Method 3: First, the user directly connects to the Web server and searches for the shortcut key configuration file; then, the user modifies the shortcut key or target key combination bound to the keyboard event and updates the shortcut key configuration file.
[0089] Through the above three methods, the user modifies the key or key combination corresponding to the function, saves the information, and updates the shortcut key configuration file on the server. After the server shortcut key configuration file is updated, the user obtains the shortcut key configuration information from the server the next time he logs in.
[0090] In summary, the embodiments of the present application support users to modify shortcut keys, thereby achieving user customization and flexibility.
[0091] Figure 5 2 shows another preferred implementation step schematic diagram of the method for implementing the Web-side shortcut keys according to an embodiment of the present application.
[0092] like Figure 5 As shown, in a preferred embodiment, the method further includes S5: the user customizes the key function corresponding to the shortcut key or key combination.
[0093] In specific implementation, the key functions corresponding to the S5 user-defined shortcut keys or key combinations include:
[0094] S51: receiving a key function modification instruction;
[0095] S52: Record the user's current operation, execution sequence and system status, and generate a record file;
[0096] S53: receiving the modification completion instruction and using the record file as a user-defined function;
[0097] S54: Setting a shortcut key or key combination corresponding to the user-defined function, and updating a shortcut key configuration file.
[0098] Figure 6 A principle flow chart of key functions corresponding to custom shortcut keys or key combinations according to an embodiment of the present application is shown in FIG.
[0099] like Figure 6 As shown, during the specific implementation, click Start to generate shortcut keys, the system starts to record the current user's current operations and execution order, click End to record shortcut keys, the system generates a file to record the previously executed functions and operation order, and the system status during the operation; save it as a user-defined function and set the trigger key.
[0100] After that, when the user uses the same function, he only needs to trigger a shortcut key. This function is suitable for operation sequences that are complex and frequent but have high repeatability.
[0101] Therefore, the embodiment of the present application provides a method for customizing shortcut keys. According to the writing specification, users can customize the basic function sequence and set trigger shortcut keys. Users can also search for shortcut keys in the community. If someone has implemented the same shortcut function, the user can download that shortcut key file or directly import and save it into their own shortcut key file.
[0102] Users can also upload their own configuration files or specific custom functions for others to download and use.
[0103] This application realizes one-key reuse of multiple functions through the custom shortcut key function, which greatly simplifies the triggering of shortcut keys.
[0104] In order to further illustrate the process of the embodiment of the present application, the solution is described below through a specific scenario.
[0105] The embodiment assumes that a form editing is used as an example. A system has multiple forms, and services are completed by editing the forms. The forms have multiple controls: input boxes or option boxes.
[0106] 1. First, set the system status including global status, edit form status and edit control status.
[0107] The basic functions for setting global status are: find form, open form, delete form, create new form, edit form; edit form status: form functions are: add record, delete record, modify record, save modification; edit control status: search control available options, next control, previous control.
[0108] 2. Then, set the shortcut keys.
[0109] The shortcut keys in the global state are: Find Form (s), Open Form (o), Create Form (n), Edit Form (e), Delete Form (d).
[0110] The shortcut keys in the global state are usually bound to the root element, such as the html element, so that the page can monitor all keyboard events. This is the top-level root node of the entire page. It can also be a user-defined element, such as root, which is created by the user. When the focus is in this custom element, keyboard events can be monitored.
[0111] The shortcut keys in the form editing state are: add record (i), delete record (d), modify record (m), save changes (s).
[0112] The shortcut keys or key combinations in the control editing state are: search control available options (Ctrl+s), next control (enter), previous control (shift+enter).
[0113] 3. Next, the user modifies the default configuration. For example, the previous control in the control editing state is changed to (F1), and the search control option is changed to (F4).
[0114] The user presses "S" on the keyboard, and the system determines the current state. If the current state is global, the search control box pops up; if the current state of the system is edit form state, save the changes; if the current state of the system is edit control, do nothing.
[0115] 4. Next, customize the functions of the shortcut keys.
[0116] Click Start to define shortcut keys, and then execute the operations you need to do, that is, the basic functions and custom functions defined previously; click Finish, enter the corresponding trigger key, and click Save. The server will record the functions and sequence executed during this period, and save the information to the user's corresponding shortcut key configuration file. The next time the user directly uses the shortcut keys, he can execute the tasks in sequence.
[0117] In addition, in other implementations of the present application, searching for a target shortcut key or a target key combination in the current system state through the shortcut key configuration information, and executing a key function corresponding to the target shortcut key or the target key combination, includes:
[0118] If there is no corresponding target shortcut key or target key combination in the current system state, then find out whether the previous page node is bound to the target shortcut key or target key combination until the page root node.
[0119] In addition to identifying the current system state, the implementation method of the present application can also use a nested approach. If the current system state does not meet the shortcut key requirements, the shortcut keys and key functions can be matched to the upper node until the corresponding shortcut function or the root element is matched. The page node is like a tree, with a trunk and branches, and finally a root node. Except for the root node, each node has a parent node.
[0120] Figure 7 Another principle flow chart of the method for implementing a Web-side shortcut key according to an embodiment of the present application is shown in FIG.
[0121] like Figure 7 As shown, the user triggers a keyboard event, triggers the keyboard event bound to activeElement, and then checks whether the current node has a corresponding shortcut function and corresponding shortcut key information; if so, executes the corresponding function and ends the keyboard event; if not, triggers the shortcut key event bound to the previous node until the root node of the page is found.
[0122] In summary, the Web-side shortcut key implementation method of the present application is adopted, by monitoring keyboard events at the root node of the entire page; detecting the triggered target keyboard event, searching for the target shortcut key or target key combination used by the user through the event event, and identifying the current system state; searching for the target shortcut key or target key combination under the current system state through the shortcut key configuration information, and executing the key function corresponding to the target shortcut key or target key combination. The present application is aimed at complex Web pages with numerous functions, many shortcut keys, and many and complex key combinations. After monitoring the shortcut key triggering event, it first determines the current system state, and then determines the corresponding key function, so that functions in different states of the system can be triggered with the same key or key combination, which greatly simplifies the shortcut key triggering process and realizes the reuse of shortcut keys. The present application predefines which states the system can be in and which functions are required for each state.
[0123] In addition, this application realizes one-key reuse of multiple functions through the custom shortcut key function, which greatly simplifies the triggering of shortcut keys; at the same time, this application supports users to modify shortcut keys, realizing user customization and flexibility. This application solves the problem that the current shortcut key setting method cannot meet the needs of complex web functions and the shortcut keys are not easy to operate to a certain extent.
[0124] Example 2
[0125] This embodiment provides a Web-side shortcut key implementation system. For details not disclosed in the Web-side shortcut key implementation system of this embodiment, please refer to the specific implementation content of the Web-side shortcut key implementation method in other embodiments.
[0126] Figure 8 A structural diagram of a Web-side shortcut key implementation system according to an embodiment of the present application is shown in FIG.
[0127] like Figure 8 As shown, the Web-side shortcut key implementation system includes a keyboard event monitoring module 10, a shortcut key confirmation module 20 and a key function implementation module 30.
[0128] Specifically,
[0129] Keyboard event monitoring module 10: used to monitor keyboard events at the root node of the entire page;
[0130] The shortcut key confirmation module 20 is used to detect the triggered target keyboard event, find the target shortcut key or target key combination used by the user through the event event, and identify the current system state;
[0131] The key function realization module 30 is used to search for the target shortcut key or target key combination in the current system state through the shortcut key configuration information, and execute the key function corresponding to the target shortcut key or target key combination.
[0132] The Web-side shortcut key implementation system of the present application is adopted, and keyboard events are monitored at the root node of the entire page through the keyboard event monitoring module 10; the shortcut key confirmation module 20 detects the triggered target keyboard event, searches for the target shortcut key or target key combination used by the user through the event event, and identifies the current system state; the key function implementation module 30 searches for the target shortcut key or target key combination in the current system state through the shortcut key configuration information, and executes the key function corresponding to the target shortcut key or target key combination.
[0133] This application is aimed at complex web pages with many functions, many shortcut keys, and many and complex key combinations. After detecting a shortcut key trigger event, it first determines the current system state, and then determines the corresponding key function, so that functions in different system states can be triggered by the same key or key combination, which greatly simplifies the shortcut key triggering process and realizes the reuse of shortcut keys. This application predefines which states the system can be in and which functions each state requires.
[0134] In addition, this application realizes one-key reuse of multiple functions through the custom shortcut key function, which greatly simplifies the triggering of shortcut keys; at the same time, this application supports users to modify shortcut keys, realizing user customization and flexibility. This application solves the problem that the current shortcut key setting method cannot meet the needs of complex web functions and the shortcut keys are not easy to operate to a certain extent.
[0135] Example 3
[0136] This embodiment provides a shortcut key implementation device. For details not disclosed in the device of this embodiment, please refer to the specific implementation content of the Web-side shortcut key implementation method or system in other embodiments.
[0137] Fig. 9 A structural schematic diagram of a shortcut key implementation device 400 according to an embodiment of the present application is shown in FIG.
[0138] like Fig. 9 As shown, the shortcut key implementation device 400 includes: a storage unit 402: used to store executable instructions; and a processing unit 401: used to connect with the storage unit 402 to execute the executable instructions to complete the Web-side shortcut key implementation method.
[0139] Those skilled in the art will understand that Fig. 9 It is only an example of the shortcut key implementation device 400 and does not constitute a limitation of the shortcut key implementation device 400. It can include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the device 400 can also include input and output devices, network access devices, buses, etc.
[0140] The so-called processing unit 401 (Central Processing Unit, CPU) can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processing unit 401 can also be any conventional processor, etc. The processing unit 401 is the control center of the shortcut key implementation device 400, and uses various interfaces and lines to connect various parts of the entire shortcut key implementation device 400.
[0141] The storage unit 402 can be used to store computer-readable instructions. The processing unit 401 implements various functions of the device 400 by running or executing the computer-readable instructions or modules stored in the storage unit 402 and calling the data stored in the storage unit 402. The storage unit 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created by using the device 400 according to the shortcut keys, etc. In addition, the storage unit 402 can include a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk device, a flash memory device, a read-only device (Read-Only Memory, ROM), a random access device (Random Access Memory, RAM) or other non-volatile / volatile devices.
[0142] If the module integrated in the shortcut key implementation device 400 is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also instruct the relevant hardware to complete it through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and when the computer-readable instructions are executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented.
[0143] Example 5
[0144] This embodiment provides a computer-readable storage medium on which a computer program is stored; the computer program is executed by a processor to implement the Web-side shortcut key implementation method in other embodiments.
[0145] The device and storage medium of the embodiment of the present application monitor keyboard events at the root node of the entire page; detect the triggered target keyboard event, search for the target shortcut key or target key combination used by the user through the event event, and identify the current system state; search for the target shortcut key or target key combination in the current system state through the shortcut key configuration information, and execute the key function corresponding to the target shortcut key or target key combination. The present application is aimed at complex Web pages with many functions, many shortcut keys, and many and complex key combinations. After monitoring the shortcut key triggering event, it first determines the current system state, and then determines the corresponding key function, so that functions in different states of the system can be triggered by the same key or key combination, which greatly simplifies the shortcut key triggering process and realizes the reuse of shortcut keys. The present application predefines which states the system can be in and which functions are required for each state.
[0146] In addition, this application realizes one-key reuse of multiple functions through the custom shortcut key function, which greatly simplifies the triggering of shortcut keys; at the same time, this application supports users to modify shortcut keys, realizing user customization and flexibility. This application solves the problem that the current shortcut key setting method cannot meet the needs of complex web functions and the shortcut keys are not easy to operate to a certain extent.
[0147] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0148] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0149] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0151] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0152] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0153] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0154] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for implementing shortcut keys on a Web client. It is characterized in that include: Listen for keyboard events at the root node of the entire page; Detecting the triggered target keyboard event, searching the target shortcut key or target key combination used by the user through the event event, and identifying the current system state; searching the target shortcut key or target key combination in the current system state through the shortcut key configuration information, and executing the key function corresponding to the target shortcut key or target key combination; a target shortcut key or target key combination corresponds to a key function in the same system state; pre-setting the system state to include the global state, the edit form state, and the edit control state; If there is no corresponding target shortcut key or target key combination in the current system state, then find out whether the previous page node is bound to the target shortcut key or target key combination until the page root node; Also includes: user-defined shortcut keys or key combinations corresponding to key functions; specifically including: Receive key function modification instructions; Record the user's current operations, execution sequence, and system status, and generate record files; receiving a modification completion instruction and treating the record file as a user-defined function; Set the shortcut key or key combination corresponding to the user-defined function, and update the shortcut key configuration file.
2. The method for implementing a shortcut key on a Web terminal according to claim 1, It is characterized in that Also includes: Users can modify the shortcut keys or key combinations bound to keyboard events through the shortcut key configuration file.
3. The method for implementing a shortcut key on a Web terminal according to claim 2, It is characterized in that The user modifies the shortcut key or key combination bound to the keyboard event through the shortcut key configuration file, including: The web server transmits the shortcut key configuration file to the user through the download interface; The user modifies the shortcut key or target key combination bound to the keyboard event and returns the new shortcut key configuration file; The Web server receives and updates the new shortcut key configuration file.
4. The method for implementing a Web-side shortcut key according to claim 2, It is characterized in that The user modifies the shortcut key or key combination bound to the keyboard event through the shortcut key configuration file, including: Provide users with a shortcut key configuration interface; The user modifies the shortcut key or key combination bound to the keyboard event through the shortcut key configuration interface, obtains a new shortcut key configuration file and updates it.
5. The method for implementing a shortcut key on a Web terminal according to any one of claims 1 to 4, It is characterized in that Also includes: Pre-set system states include global state, edit form state, and edit control state; The basic functions for setting the global state include finding a form, opening a form, deleting a form, creating a new form, and editing a form; The form functions of setting the edit form state include adding records, deleting records, modifying records and saving modifications; The form functions that set the state of the edit control include the search control available options, the next control, and the previous control.
6. A web-side shortcut key implementation system, It is characterized in that include: Keyboard event monitoring module: used to monitor keyboard events at the root node of the entire page; Shortcut key confirmation module: used to detect the triggered target keyboard event, find the target shortcut key or target key combination used by the user through the event event, and identify the current system state; It is also used for users to customize the key functions corresponding to shortcut keys or key combinations; Specifically including: receiving key function modification instructions; Record the user's current operations, execution sequence, and system status, and generate record files; receiving a modification completion instruction and treating the record file as a user-defined function; Set the shortcut key or key combination corresponding to the user-defined function and update the shortcut key configuration file; Key function implementation module: used to find the target shortcut key or target key combination in the system state through the shortcut key configuration information, and execute the key function corresponding to the target shortcut key or target key combination; one target shortcut key or target key combination corresponds to one key function in the same system state; the pre-set system state includes the global state, the edit form state and the edit control state; If there is no corresponding target shortcut key or target key combination in the current system state, then find out whether the previous page node is bound to the target shortcut key or target key combination until the page root node.
7. A shortcut key implementation device, It is characterized in that include: A storage unit for storing executable instructions; as well as A processing unit, used to connect to a device to execute executable instructions to complete the method according to any one of claims 1-5.
