Server hot key setting method, device and equipment and readable storage medium
By obtaining and updating hotkey files and mapping tables in the server settings interface, customizing and personalizing hotkeys is realized, solving the problem that traditional hotkey configuration does not meet user needs, improving system flexibility and user experience. Avoid security risks.
Patent Information
- Application Number
- CN202411381394.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-30
AI Technical Summary
Traditional server hotkey configuration does not meet the needs of all users, and the custom hotkey technology is high and there are security risks, making it difficult to achieve safe and convenient personalized customization.
By obtaining the hotkey files formulated by the user based on the hotkey custom form in the setting interface, determining the target hotkey functions and scanning codes, updating the mapping table, and taking effect when the server restarts, the customization and personalization of hotkeys are achieved, and avoiding the need for customization and personalization of hotkeys. Use third-party tools to reduce security risks.
It realizes flexible customization of server hotkeys, improves the personalization and convenience of the system, reduces user technical requirements, and improves user experience, avoids security risks.
Smart Images

Figure CN119248118A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hotkey settings, and in particular to a server hotkey setting method, device, equipment and readable storage medium. Background Art
[0002] During server use and management, users or administrators may need to frequently enter the BIOS (Basic Input / Output System) to make configuration changes or troubleshoot problems, and may also need to quickly select startup items or enter the startup environment of PXE (Preboot Execution Environment), USB (Universal Serial Bus) or TF (TransFlash Card, an extremely small flash memory card). In this case, the convenience of hotkeys is reflected.
[0003] Traditional hotkey configuration does not always meet the needs of all users. Since BIOS hotkeys are usually fixed, changing hotkeys requires high user skills and may also pose security risks. Therefore, how to customize hotkeys safely and conveniently to meet user personalized needs is a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of this, an object of the present invention is to provide a server hotkey setting method, device, equipment and readable storage medium, which solves the problem that personalized customization of server hotkeys is difficult to achieve in the prior art.
[0005] In order to solve the above technical problems, the present invention provides a server hotkey setting method, comprising:
[0006] Get the hotkey file that the user has set based on the hotkey customization form in the settings interface;
[0007] Determine the target hotkey function according to the option name of the hotkey file, and determine the target hotkey scan code according to the key name of the hotkey file;
[0008] updating a mapping table according to the target hotkey scan code and the target hotkey function, and saving the mapping table; the mapping relationship between keyboard scan codes and keyboard functions is stored in the mapping table;
[0009] When the server is restarted, the updated mapping table takes effect.
[0010] On the one hand, after determining the target hotkey function according to the option name of the hotkey file, it also includes:
[0011] According to the target hotkey function, the hotkey file is saved in a folder of the same category function.
[0012] On the one hand, before updating the mapping table according to the target hotkey scan code and the target hotkey function, it also includes:
[0013] The mapping relationship between the hotkey scan code and the hotkey function is set based on experience to obtain the mapping table.
[0014] On the one hand, after the updated mapping table takes effect, it also includes:
[0015] When the CheckForKey function detects that the user presses a hot key during the startup phase, the scan code corresponding to the hot key is obtained;
[0016] Searching whether there is a hot key scan code corresponding to the hot key based on the updated mapping table;
[0017] If it exists, then search for the target function corresponding to the hotkey, execute the target function, and enter the corresponding interface;
[0018] If it does not exist, the boot function is executed and an error message is displayed on the interface;
[0019] When the CheckForKey function does not detect that the user presses the hot key during the startup phase, the hot key prompt information in the hot key customization form is loaded and displayed; the hot key prompt information is used to inform the user how to perform the next operation; the hot key prompt information is automatically generated according to the mapping relationship in the mapping table.
[0020] On the one hand, after determining the target hotkey function according to the option name of the hotkey file and determining the target hotkey scan code according to the key name of the hotkey file, the method further includes:
[0021] Determining the validity condition according to the validity tag of the hotkey file;
[0022] Accordingly, when the server is restarted, the updated mapping table takes effect, including:
[0023] When the server is restarted, the updated mapping table is effective under the effectiveness condition.
[0024] On the one hand, the hotkey customization form also includes help information, and the help information is used to explain the function and purpose of each option.
[0025] On the one hand, after determining the target hotkey function according to the option name of the hotkey file and determining the target hotkey scan code according to the key name of the hotkey file, the method further includes:
[0026] When the custom hotkey obtained based on the hotkey file conflicts with other hotkeys, a prompt is given and a hotkey conflict solution is provided.
[0027] The present invention also provides a server hotkey setting device, comprising:
[0028] A hotkey file acquisition module is used to obtain the hotkey file set by the user based on the hotkey custom form in the setting interface;
[0029] A target determination module, used to determine a target hotkey function according to an option name of the hotkey file, and to determine a target hotkey scan code according to a key name of the hotkey file;
[0030] A mapping table updating module, used for updating and saving a mapping table according to the target hotkey scan code and the target hotkey function; the mapping table stores a mapping relationship between keyboard scan codes and keyboard functions;
[0031] The validation module is used to enable the updated mapping table to take effect when the server is restarted.
[0032] The present invention also provides a server hotkey setting device, comprising:
[0033] Memory for storing computer programs;
[0034] The processor is used to implement the steps of the above-mentioned server hotkey setting method when executing the computer program.
[0035] The present invention also provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned server hot key setting method are implemented.
[0036] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above-mentioned server hot key setting method when executed by a processor.
[0037] It can be seen from the above technical scheme that the present invention obtains the hotkey file formulated by the user based on the hotkey customization form in the setting interface; determines the target hotkey function according to the option name of the hotkey file, and determines the target hotkey scan code according to the key name of the hotkey file; updates the mapping table according to the target hotkey scan code and the target hotkey function, and saves it; the mapping table stores the mapping relationship between the keyboard scan code and the keyboard function; when the server is restarted, the updated mapping table takes effect. The beneficial effect of the present invention is that in the present invention, the user can formulate a hotkey file based on the hotkey customization form, and update the mapping table based on the hotkey file, so as to realize the customization of the server hotkey. The present invention allows the user to customize the hotkeys and their functions according to the needs to adapt to different usage scenarios, thereby improving the flexibility and personalization of the system. In particular, it is realized by configuring the hotkey file and the mapping table, which does not involve third-party tools and does not have security risks; it has lower requirements on users and also improves the user experience.
[0038] In addition, the present invention also provides a server hotkey setting device, equipment and readable storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0040] Figure 1 A flow chart of a server hotkey setting method provided by an embodiment of the present invention;
[0041] Figure 2 An example flow chart of a server hotkey customization method provided by an embodiment of the present invention;
[0042] Figure 3 An example diagram of an operation flow provided by an embodiment of the present invention;
[0043] Figure 4 A schematic diagram of the structure of a server hot key setting device provided by an embodiment of the present invention;
[0044] Figure 5 A schematic diagram of the structure of a server hotkey setting device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] Hotkeys, also known as shortcut keys, refer to specific keys or key combinations used during the server startup process to quickly access certain functions, such as entering BIOS settings, boot device selection, etc. The existence of hotkeys simplifies the user's operation process, allowing users to perform key tasks without having to remember complex commands or menu paths. Generally speaking, different devices and motherboards have different hotkey configurations. For example, common BIOS hotkeys for entering the Setup interface include F2, Del (Delete key), Esc (End key), etc.
[0047] During server use and management, users or administrators may need to frequently enter the BIOS to make configuration changes or troubleshoot problems, and may also need to quickly select boot items or enter the PXE, USB or TF card boot environment. However, traditional hotkey configurations do not always meet the needs of all users. Specifically, users may have the following needs: (1) Flexibility and customization: adapt to the user's personal preferences or specific workflows. For example, a user may want to use a key that is easier to remember or more convenient to operate as a hotkey; (2) Convenience: In a server room environment, it may be difficult to physically access the server due to small space or a large number of servers. Custom hotkeys can help administrators access the required functions more quickly, especially in remote management. (3) Uniformity: There may be multiple brands and models of servers in the user's computer room. Generally speaking, the default hotkey designs of different brands are different. If the functions of the hotkeys cannot be unified, it will cause great trouble to the administrators. The administrators need to customize the functions to achieve hotkey unification.
[0048] The current technical implementation of hotkey settings can be divided into the following two categories: (1) Firmware customization: For advanced users or enterprise environments, custom firmware can be used to implement custom hotkey functions. This usually involves modifying the BIOS source code and then recompiling the BIOS image to include the customized hotkey configuration. This method requires professional skills and knowledge and is usually performed by BIOS engineers. (2) Third-party tools: Although using third-party tools to simulate hotkey behavior is feasible in some cases, such tools need to run in an OS (Operating System) environment and are not recommended for server environments because there may be security risks. Third-party tools may bypass the BIOS security mechanism, making the system vulnerable to attacks.
[0049] Therefore, the setting of server hotkeys involves the basic functions of BIOS, the role of hotkeys, specific needs of users, etc. As server management becomes more and more complicated, custom hotkeys have become one of the important means to improve efficiency. Through reasonable planning and implementation, users can make full use of this function to better manage and maintain their server equipment. To this end, the present invention provides a server hotkey setting method that can solve the above problems and realize safe and low-demand server hotkey customization.
[0050] Please refer to Figure 1 , Figure 1 A flow chart of a method for setting a server hotkey provided by an embodiment of the present invention. The method may include:
[0051] S101: Acquire a hotkey file defined by the user in a setting interface based on a hotkey customization form.
[0052] The execution subject of this embodiment is a terminal. The terminal can be a local terminal or a remote terminal. When the server starts, the hotkey customization form will be displayed in the setting interface, and the user can use the hotkey customization form in the setting interface to perform hotkey customization operations. If the user does not perform customization operations, the hotkey customization form in the setting interface can also be closed. The option name and optional key name in the customization form. Exemplarily, the option name may include Hotkey To Setup (a shortcut key for typing settings), Hotkey To Boot Menu (a shortcut key for entering the boot menu), Hotkey To PXE Boot (a shortcut key for starting the network), etc. Corresponding to each option name, there are multiple key names. Exemplarily, the optional key names corresponding to Hotkey To Setup (a shortcut key for typing settings) include: ESC, DEL, F1, F2, F3, etc. It should be noted that users can also customize and add additional option names. It can be understood that the option name is a name that can represent the function of the hotkey.
[0053] Furthermore, this embodiment may also allow users to customize hotkey macros, that is, a hotkey triggers a series of predefined operations or commands, thereby improving operational efficiency.
[0054] Furthermore, in order to make operation more convenient for users and reduce the knowledge requirements for users, the above hotkey customization form may also include help information, which is used to explain the function and purpose of each option.
[0055] Specifically, when a user formulates a hotkey file based on a custom form, help information can be configured for each option. When the user selects the option, help information can pop up to explain the function and purpose of the option for easy understanding by the user.
[0056] Furthermore, in order to avoid the problem that the custom hotkey cannot take effect, the following steps can also be included:
[0057] When a custom hotkey obtained based on a hotkey file conflicts with other hotkeys, a prompt will be given and a hotkey conflict solution will be provided.
[0058] Specifically, when a user executes a hotkey file, the system can help the user avoid invalid hotkeys, that is, when a hotkey is selected, it is determined whether the selected hotkey has other functions; if yes, the user is prompted that the key cannot be applied; if no, the key can be used. Furthermore, when a conflict occurs, suggestions for hotkey conflict resolution are provided, such as automatically adjusting the default settings of certain hotkeys.
[0059] S102: Determine a target hotkey function according to the option name of the hotkey file, and determine a target hotkey scan code according to the key name of the hotkey file.
[0060] After the user sets the hotkey file in the setting interface, the hotkey function selected by the user can be determined based on the option name of the hotkey file, and the target hotkey scan code selected by the user can be determined based on the key name of the hotkey file. The target hotkey scan code refers to the keyboard scan code corresponding to the key selected by the user.
[0061] Furthermore, in order to facilitate hotkey management, after determining the target hotkey function according to the option name of the hotkey file, the following steps may also be included:
[0062] According to the target hotkey function, save the hotkey file in a folder of the same category function.
[0063] Specifically, the hotkey file can be determined according to the target hotkey function to which category of function it belongs. Of course, it can also be placed in the submenu Hotkey Setting under Advanced Form, and then further find the submenu of the same category of function in the submenu Hotkey Setting.
[0064] S103: updating a mapping table according to the target hotkey scan code and the target hotkey function, and saving the mapping table; the mapping relationship between the keyboard scan code and the keyboard function is stored in the mapping table.
[0065] It should be noted that the mapping table in this embodiment records the mapping relationship between keyboard scan codes and keyboard functions. The mapping table in this embodiment can record all keyboard scan codes and their corresponding keyboard function mapping relationships. If a key is not a hotkey and does not have a keyboard function, its mapping is empty.
[0066] Furthermore, under default conditions, or when initialized (initialization will automatically enter the default conditions), the mapping table records the mapping relationship between the hotkey scan code and the hotkey function set based on experience.
[0067] Specifically, the mapping table in this embodiment only records the hot keys, and does not record other keys. This ensures that the keyboard scan codes recorded in the mapping table are all keyboard scan codes of the hot keys, reduces the mapping complexity of the mapping table, and saves the storage space of the mapping table.
[0068] S104: When the server is restarted, the updated mapping table takes effect.
[0069] When the mapping table is updated and saved, after the server is restarted, the updated mapping table takes effect, the user-defined hotkey file takes effect, and the hotkey change / customization is completed.
[0070] Furthermore, after the updated mapping table takes effect, the following steps may be further included:
[0071] When the CheckForKey function detects that the user presses a hot key during the startup phase, it obtains the scan code corresponding to the hot key;
[0072] Find out whether there is a hot key scan code corresponding to the hot key based on the updated mapping table;
[0073] If it exists, then search for the target function corresponding to the hotkey, execute the target function, and enter the corresponding interface;
[0074] If it does not exist, the boot function is executed and an error message is displayed on the interface;
[0075] When the CheckForKey function does not detect that the user presses the hot key during the startup phase, the hot key prompt information in the hot key customization form is loaded and displayed; the hot key prompt information is used to inform the user how to perform the next operation; the hot key prompt information is automatically generated according to the mapping relationship in the mapping table.
[0076] Specifically, the function of the CheckForKey function is to monitor keyboard input and check whether a key is pressed. When a key is detected, the scan code of the key is returned for subsequent code to judge. When the returned scan code queries the mapping table defined in hotkey_actions.c (mapping table definition file), if the scan code exists in the mapping table, it means that there is a corresponding function, and the corresponding hotkey function is executed; if there is no corresponding function record for the key in the mapping table, the boot process continues. In this embodiment, hotkey prompt information is generated according to the mapping relationship in the mapping table, and the hotkey prompt information can be used to prompt the user how to perform the next operation. Exemplarily, the hotkey prompt information can clearly inform the user how to enter the Setup setting interface or perform other operations. For example, the hotkey prompt information can be: Press F2 to enter setup (Press F2 to enter the setup interface). Its hotkey prompt information is displayed on the screen so that the user can clearly know the next operation. It should be noted that because the hotkey is set to different functions, the corresponding prompt information is also different, so the prompt information needs to be updated according to different settings. When a valid key is detected in this embodiment, it can be determined whether the key is a hot key set in the mapping table according to the hot key scan code in the mapping table. If it is a hot key set in the mapping table, the function corresponding to the hot key is determined based on the mapping relationship corresponding to the hot key scan code in the mapping table, and the corresponding interface is entered. When no valid user key is detected or the hot key is not in the mapping table, a hot key prompt message can be set to prompt the user to prevent the user from entering other interfaces by pressing the wrong key, thereby improving security and user experience.
[0077] This embodiment does not limit the display form of the hotkey prompt information. In addition to text prompts, multimedia elements such as icons and animations can also be added to make the hotkey prompt information more intuitive and easy to understand. It can also automatically adjust the display mode of the prompt information, such as color, font size, etc., according to user preferences or system settings.
[0078] Further, in order to increase the flexibility of hotkey setting, after determining the target hotkey function according to the option name of the hotkey file and determining the target hotkey scan code according to the key name of the hotkey file, the following steps may also be included:
[0079] Determine the validity condition according to the validity tag of the hotkey file;
[0080] Accordingly, when the server is restarted, the updated mapping table takes effect, including:
[0081] When the server is restarted, the updated mapping table takes effect under the effective conditions.
[0082] The purpose of this step is to enhance the flexibility of hotkey configuration. While allowing users to define only the hotkey function, they can also define the hotkey validity conditions. For example, it is only valid during a specific time period or when a specific user is logged in.
[0083] Furthermore, the present embodiment can also define the setting permissions for the hotkey file. For example, different hotkey setting permissions are provided for different user levels, such as administrators and ordinary users. Alternatively, when the user is an advanced user, the optional option names and optional hotkey functions in the hotkey customization form are more abundant, while when the user is a novice user, the hotkey settings can be simplified.
[0084] Furthermore, before obtaining the hotkey file defined by the user in the setting interface based on the hotkey customization form, it also includes:
[0085] Get the user's historical hotkey records and current hotkey records;
[0086] Adjust the selectable item names and selectable hotkey functions in the hotkey customization form according to the historical hotkey records and current hotkey records.
[0087] Specifically, this embodiment can obtain the user's hot key usage habits based on the user's historical hot key records and current hot key records, and set more friendly optional item names and optional hot key functions in the user's hot key customization form based on the hot key usage habits, so that the user can more easily set the hot keys of his personal usage habits, and the optional items in the hot key customization form are more streamlined, more targeted and personalized.
[0088] The server hotkey setting method provided by the embodiment of the present invention is applied, by obtaining the hotkey file formulated by the user based on the hotkey customization form in the setting interface; determining the target hotkey function according to the option name of the hotkey file, and determining the target hotkey scan code according to the key name of the hotkey file; updating the mapping table according to the target hotkey scan code and the target hotkey function, and saving it; the mapping table stores the mapping relationship between the keyboard scan code and the keyboard function; when the server is restarted, the updated mapping table takes effect. The beneficial effect of this method is that in this method, the user can formulate a hotkey file based on the hotkey customization form, and update the mapping table based on the hotkey file, so as to realize the customization of the server hotkey. This method allows the user to customize the hotkeys and their functions according to needs to adapt to different usage scenarios, thereby improving the flexibility and personalization of the system. In particular, it is implemented by configuring the hotkey file and the mapping table, does not involve third-party tools, and does not have security risks; it has lower requirements on users and also improves the user experience.
[0089] In addition, help information is provided to facilitate users to customize server hotkeys; and hotkey files are saved in folders with the same function to facilitate management of hotkey files; and hotkey prompt information is dynamically generated and displayed on the screen according to the user's hotkey settings, and the hotkey prompt information displayed on the screen is dynamically updated according to changes in the hotkey settings to guide user operations, thereby improving the friendliness and intuitiveness of the user interface; and the CheckForKey function is implemented to monitor keyboard input, and a mapping table is queried based on the returned scan code to decide whether to execute the corresponding hotkey function.
[0090] In order to make the present invention easier to understand, please refer to Figure 2 and Figure 3 , Figure 2 A flow chart of a method for customizing server hotkeys provided by an embodiment of the present invention is provided. Figure 3 An example diagram of an operation flow provided for an embodiment of the present invention may specifically include:
[0091] Step 1: Create a uni file to define the option names, optional hotkey names, and help information displayed in the Setup interface. For example, create a HotkeyOption.uni (shortcut option) code file, i.e., a hotkey file. This hotkey file can define multiple option names or a single option name. For example, Hotkey To Setup (a shortcut key for typing settings), Hotkey To Boot Menu (a shortcut key for entering the boot menu), Hotkey To PXE Boot (a shortcut key for starting the network), etc. For each option, define its optional hotkey name, such as ESC, DEL, F1, F2, F3, etc.; add detailed help information to each option to explain the function and purpose of the option.
[0092] Step 2: Create an Sdl file to define the Scan Code (also called keyboard scan code) of each hotkey to be used. For example, create a hotkeys.sdl code file to list all the hotkeys that can be used and their corresponding scan codes, such as F1, F2, Esc, DEL, etc.
[0093] Step 3: Create an sd file, define menu items HotkeyToSetup, HotkeyToBootMenu, HotkeyToPXEBoot, etc., and place them in the submenu Hotkey Setting under Advanced Form. For example, create an advanced_menu.sd code file, define a form Hotkey Setting, which contains the menu items mentioned above. These menu items correspond to the menu names in step 1 and are displayed in Setup. The optional hotkey names of each menu item are all keys that can be used as hotkey functions. For example, under the HotkeyToSetup menu, the optional options are ESC, DEL, F1, F2, F3, etc.
[0094] Step 4: Create a C file to define the mapping table of hotkeys and functions, and update the mapping relationship in the mapping table according to the hotkeys set above. For example, create hotkey_actions.c, use a data structure to save the default hotkeys and their corresponding functions, and if the settings in setup are not the default values, use the UpdateHotkeyOption() function to update the hotkey mapping relationship to keep it consistent with the options set by the user in Setup.
[0095] Step 5: Create a uni file to define the hotkey prompt information displayed on the screen under different settings. After the hotkey is set to different functions, the corresponding prompt information is also different, so the prompt information needs to be updated according to different settings. For example: create hotkey_prompts.uni to define the hotkey prompt information displayed on the screen, such as "Press F2 to enter setup".
[0096] Step 6: After the server is powered on, the hotkey prompt information is printed on the screen during the POST (a step in the computer startup process). During the POST process, the settings of the Setup hotkey are determined, and the corresponding prompt information defined in hotkey_prompts.uni is dynamically loaded and displayed. These prompt information will clearly inform the user how to enter the Setup interface or perform other operations.
[0097] Step 7: CheckForKey function detects the currently pressed key. Function: CheckForKey monitors keyboard input and checks whether a key is pressed. When a key is detected, the scan code of the key is returned for subsequent code to judge.
[0098] Step 8: Determine whether the pressed hotkey has a corresponding function record in the mapping table. Use the scan code returned by the CheckForKey function to query the mapping table defined in hotkey_actions.c. If the scan code exists in the mapping table, it means that the corresponding function exists.
[0099] Step 9: If the hotkey pressed in step 8 has a corresponding function record in the mapping table, execute the corresponding hotkey function; if the hotkey pressed in step 8 has no corresponding function record in the mapping table, continue to execute the boot process. The code logic is: if the hotkey has a corresponding function, call the corresponding processing function; if the hotkey does not have a corresponding function, ignore this key and continue the normal boot process.
[0100] The above steps reflect that the whole process from hotkey definition, user configuration, hotkey detection to function execution is integrated into one system, forming a closed-loop solution and enhancing the integrity of the system and user experience.
[0101] The following is an introduction to a server hotkey setting device provided by an embodiment of the present invention. The server hotkey setting device described below and the server hotkey setting method described above can be referenced to each other.
[0102] Please refer to Figure 4 , Figure 4 A schematic diagram of the structure of a server hotkey setting device provided by an embodiment of the present invention may include:
[0103] The hotkey file acquisition module 100 is used to acquire the hotkey file set by the user based on the hotkey custom form in the setting interface;
[0104] A target determination module 200, for determining a target hotkey function according to an option name of the hotkey file, and determining a target hotkey scan code according to a key name of the hotkey file;
[0105] A mapping table updating module 300 is used to update and save a mapping table according to the target hotkey scan code and the target hotkey function; the mapping table stores a mapping relationship between keyboard scan codes and keyboard functions;
[0106] The validation module 400 is used to validate the updated mapping table when the server is restarted.
[0107] Based on the above embodiment, the server hotkey setting device may further include:
[0108] The saving module is used for, after determining the target hotkey function according to the option name of the hotkey file, saving the hotkey file in a folder of the same category function according to the target hotkey function.
[0109] Based on the above embodiment, the server hotkey setting device may further include:
[0110] The initialization module is used to set the mapping relationship between the hotkey scan code and the hotkey function according to experience before updating the mapping table according to the target hotkey scan code and the target hotkey function to obtain the mapping table.
[0111] Based on the above embodiment, the server hotkey setting device may further include:
[0112] A first detection module is used for obtaining a scan code corresponding to a hot key when a CheckForKey function detects that a user presses a hot key during a startup phase after the updated mapping table takes effect;
[0113] A search module, used for searching whether there is a hot key scan code corresponding to the hot key based on the updated mapping table;
[0114] A first search result module, used for searching for the target function corresponding to the hotkey if it exists, executing the target function, and entering the corresponding interface;
[0115] The second search result module is used to execute the boot function if the search result does not exist, and prompt an error message through the interface display;
[0116] The second detection module is used to load the hot key prompt information in the hot key customization form and display the hot key prompt information when the CheckForKey function does not detect that the user presses the hot key during the startup phase; the hot key prompt information is used to inform the user how to perform the next operation; the hot key prompt information is automatically generated according to the mapping relationship in the mapping table.
[0117] Based on the above embodiment, the server hotkey setting device may further include:
[0118] An effective condition determination module, used to determine the effective condition according to the effective tag of the hotkey file after determining the target hotkey function according to the option name of the hotkey file and determining the target hotkey scan code according to the key name of the hotkey file;
[0119] Accordingly, the validation module 400 may include:
[0120] The validation unit is used to validate the updated mapping table under the validation condition when the server is restarted.
[0121] Based on the above embodiment, the hotkey customization form may further include help information, where the help information is used to explain the function and purpose of each option.
[0122] Based on the above embodiment, the server hotkey setting device may further include:
[0123] A hotkey conflict module is used to determine the target hotkey function according to the option name of the hotkey file and the target hotkey scan code according to the key name of the hotkey file. When a custom hotkey obtained based on the hotkey file conflicts with other hotkeys, it will prompt and provide a hotkey conflict solution.
[0124] It should be noted that the order of the modules and units in the above server hotkey setting device can be changed without affecting the logic.
[0125] The server hotkey setting device provided by the embodiment of the present invention is applied, through the hotkey file acquisition module 100, used to obtain the hotkey file formulated by the user based on the hotkey customization form in the setting interface; the target determination module 200 is used to determine the target hotkey function according to the option name of the hotkey file, and determine the target hotkey scan code according to the key name of the hotkey file; the mapping table update module 300 is used to update the mapping table according to the target hotkey scan code and the target hotkey function, and save it; the mapping table stores the mapping relationship between the keyboard scan code and the keyboard function; the effectiveness module 400 is used to make the updated mapping table effective when the server is restarted. The beneficial effect of this device is that: in this device, the user can formulate a hotkey file based on the hotkey customization form, and update the mapping table based on the hotkey file, so as to realize the customization of the server hotkey. This device allows the user to customize the hotkey and its function according to the needs to adapt to different usage scenarios, thereby improving the flexibility and personalization of the system. In particular, it is realized by configuring the hotkey file and the mapping table, without involving third-party tools, and without security risks; it has low requirements for users and also improves the user experience.
[0126] In addition, help information is provided to facilitate users to customize server hotkeys; and hotkey files are saved in folders with the same function to facilitate management of hotkey files; and hotkey prompt information is dynamically generated and displayed on the screen according to the user's hotkey settings, and the hotkey prompt information displayed on the screen is dynamically updated according to changes in the hotkey settings to guide user operations, thereby improving the friendliness and intuitiveness of the user interface; and the CheckForKey function is implemented to monitor keyboard input, and a mapping table is queried based on the returned scan code to decide whether to execute the corresponding hotkey function.
[0127] Figure 5 A schematic diagram of the structure of a server hotkey setting device provided by an embodiment of the present invention, such as Figure 5 As shown, the server hotkey setting device includes:
[0128] A memory 60, for storing computer programs;
[0129] The processor 61 is used to implement the steps of the server hotkey setting method in the above embodiment when executing the computer program.
[0130] The server hotkey setting device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0131] Among them, the processor 61 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 61 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 61 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0132] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein, after the computer program is loaded and executed by the processor 61, the relevant steps of the server hotkey setting method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 602 may include Windows, Unix, Linux, etc. Data 603 may include, but is not limited to, data of the server hotkey setting method, etc.
[0133] In some embodiments, the server hotkey setting device may further include a display screen 62 , an input / output interface 63 , a communication interface 64 , a power supply 65 , and a communication bus 66 .
[0134] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation on the server hotkey setting device, and may include more or less components than those shown in the figure.
[0135] It is understandable that if the server hotkey setting method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the current technology or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and executes all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk and other media that can store program codes.
[0136] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned server hotkey setting method are implemented.
[0137] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0138] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0139] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0140] The above is a detailed introduction to a server hotkey setting device method, apparatus, equipment and readable storage medium 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 method for setting a server hotkey, characterized in that: include: Get the hotkey file that the user has set based on the hotkey customization form in the settings interface; Determine the target hotkey function according to the option name of the hotkey file, and determine the target hotkey scan code according to the key name of the hotkey file; updating a mapping table according to the target hotkey scan code and the target hotkey function, and saving the mapping table; the mapping relationship between keyboard scan codes and keyboard functions is stored in the mapping table; When the server is restarted, the updated mapping table takes effect.
2. The server hotkey setting method according to claim 1, characterized in that: After determining the target hotkey function according to the option name of the hotkey file, the method further includes: According to the target hotkey function, the hotkey file is saved in a folder of the same category function.
3. The server hotkey setting method according to claim 1, characterized in that: Before updating the mapping table according to the target hotkey scan code and the target hotkey function, the method further includes: The mapping relationship between the hotkey scan code and the hotkey function is set based on experience to obtain the mapping table.
4. The server hotkey setting method according to claim 1, characterized in that: After the updated mapping table takes effect, it also includes: When the CheckForKey function detects that the user presses a hot key during the startup phase, the scan code corresponding to the hot key is obtained; Searching whether there is a hot key scan code corresponding to the hot key based on the updated mapping table; If it exists, then search for the target function corresponding to the hotkey, execute the target function, and enter the corresponding interface; If it does not exist, the boot function is executed and an error message is displayed on the interface; When the CheckForKey function does not detect that the user presses the hot key during the startup phase, the hot key prompt information in the hot key customization form is loaded and displayed; the hot key prompt information is used to inform the user how to perform the next operation; the hot key prompt information is automatically generated according to the mapping relationship in the mapping table.
5. The server hotkey setting method according to claim 1, characterized in that: After determining the target hotkey function according to the option name of the hotkey file and determining the target hotkey scan code according to the key name of the hotkey file, the method further includes: Determining the validity condition according to the validity tag of the hotkey file; Accordingly, when the server is restarted, the updated mapping table takes effect, including: When the server is restarted, the updated mapping table is effective under the effectiveness condition.
6. The server hotkey setting method according to claim 1, characterized in that: The hotkey customization form also includes help information, which is used to explain the function and purpose of each option.
7. The server hotkey setting method according to claim 1, characterized in that: After determining the target hotkey function according to the option name of the hotkey file and determining the target hotkey scan code according to the key name of the hotkey file, the method further includes: When the custom hotkey obtained based on the hotkey file conflicts with other hotkeys, a prompt is given and a hotkey conflict solution is provided.
8. A server hotkey setting device, characterized in that: include: A hotkey file acquisition module is used to obtain the hotkey file set by the user based on the hotkey custom form in the setting interface; A target determination module, used to determine a target hotkey function according to an option name of the hotkey file, and to determine a target hotkey scan code according to a key name of the hotkey file; A mapping table updating module, used for updating and saving a mapping table according to the target hotkey scan code and the target hotkey function; the mapping table stores a mapping relationship between keyboard scan codes and keyboard functions; The validation module is used to enable the updated mapping table to take effect when the server is restarted.
9. A server hotkey setting device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the server hotkey setting method as described in any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the server hot key setting method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
User-defined keyboard and implementing method thereof
CN101158885A
BIOS-based multi-user management method and system
CN111309389A
BIOS (Basic Input / Output System) control option setting method and device and control mainboard
CN114385430A
Electronic device and method for triggering events of the electronic device
US20140304639A1
Method for modifying basic input / output system of server
US20220197785A1
Cited By
Server starting method and device, storage medium and program product
CN119861985A
Server startup method, device, storage medium and program product
CN119861985B
Server boot method, device, storage medium, and program product
WO2026194064A1
