Disclosure of Invention
Accordingly, the present invention provides a method for dynamically adjusting a backlight mode of a backlit keyboard, so as to provide a user-defined keyboard backlight, thereby solving the aforementioned inconveniences.
According to an embodiment of the present invention, a method for dynamically adjusting a light-emitting mode of a backlight keyboard is applicable to a host electrically connected to the keyboard, wherein the keyboard has a backlight module, and the method includes: obtaining a mode signal; when the mode signal indicates a general mode, loading a general configuration file; or when the mode signal indicates a self-defined mode, detecting the application program currently operated by the host, wherein the application program is in a foreground window; obtaining a custom configuration file corresponding to the application program; and selectively controlling the backlight module to emit light according to the general configuration file or the user-defined configuration file.
According to an embodiment of the present invention, a method for dynamically adjusting a lighting mode of a backlight keyboard is described, wherein before obtaining a mode signal, the method further comprises: acquiring a hardware identification code of the keyboard, wherein the hardware identification code comprises a product identification code and a supplier identification code; and confirming whether the hardware identification code exists in the identification code list; and acquiring the mode signal further comprises: the mode signal is only obtained when the hardware identification code is present in the identification code list. After confirming that the hardware identification code exists in the identification code list, the method further comprises the following steps: confirming a configuration file list corresponding to the hardware identification code; and determining whether the configuration file list has a custom configuration file corresponding to the application program; when the configuration file list has a self-defined configuration file corresponding to the application program, the self-defined configuration file is used for controlling the backlight module to emit light; otherwise, a preset configuration file in the configuration file list is used as the self-defined configuration file.
By the above structure, the method for dynamically adjusting the backlight keyboard light-emitting mode disclosed by the invention achieves the following effects by an embedded program which can be executed in a background and is operated in an operating system: besides providing a general lighting configuration file suitable for all application programs, the user can adapt to different application programs to define the lighting mode corresponding to the backlight module on the keyboard by himself and store the lighting mode as a self-defined lighting configuration file. Therefore, the effect of individually controlling the backlight module on the keyboard can be achieved. The light-emitting configuration file comprises setting details such as LED brightness, LED mode, backlight effect, backlight speed and the like. The user only needs to select the general mode or the custom mode from the embedded program after one-time setting. In the general mode, the backlight module on the keyboard will emit light according to the settings in the general configuration file. In the custom mode, the embedded program has a mechanism to automatically detect the application and switch the lighting profiles. The user can switch the application program at will, and the backlight module of the keyboard can also be matched with the application program in real time to adjust the light-emitting mode, so that richer visual experience of the user is expanded.
The above description of the present invention and the following description of the embodiments are provided to illustrate and explain the spirit and principles of the present invention and to provide further explanation of the invention as claimed in the appended claims.
Detailed Description
The detailed features and advantages of the present invention are described in detail in the embodiments below, which are sufficient for anyone skilled in the art to understand the technical contents of the present invention and to implement the present invention, and the related objects and advantages of the present invention can be easily understood by anyone skilled in the art according to the disclosure of the present specification, the protection scope of the claims and the attached drawings. The following examples further illustrate aspects of the present invention in detail, but are not intended to limit the scope of the invention in any way.
The method for dynamically adjusting the light-emitting mode of the backlight keyboard according to the embodiment of the invention is realized by an embedded program running on a host and a computer host connected with a specified backlight keyboard.
The embedded program is, for example, a Driver (Driver) built in the computer; or by optical disc mounting; or installed in the manner of USB OTG (on-the-go) through the keyboard; or the user downloads the data from the website of the original factory; or an application software installed after downloading in the form of APP (application).
The backlight keyboard is a keyboard with a backlight module. The backlight module comprises a plurality of light-emitting units and a control unit. The Light Emitting unit is, for example, a Light-Emitting Diode (LED) or a micro LED (micro LED); since the hardware design of the backlight module is the prior art, the invention is not limited; in addition, the present invention is not limited to the kind or number of hardware of the light emitting unit or the form in which the light emitting unit is disposed on the keyboard. The control unit reads a light-emitting configuration file from the host or from the memory of the control unit so as to control the plurality of light-emitting units to respectively emit the colored light with the appointed color according to the appointed mode. The lighting profile includes one or more instructions or a code segment, each for controlling all or a portion of the lighting units.
Referring to fig. 1, a flowchart of detecting a backlight keyboard according to an embodiment of the invention is shown. Referring to step S11, connect the backlight keyboard and the host. In practice, after the computer is turned on, the user needs to electrically connect the backlight keyboard to the computer in a wireless or wired manner. The embedded program can be started together with the loading of the operating system in principle or started in a mode of clicking by a user. When the embedded program is executed, the user can change the embedded program to be not started (not executed) or further uninstalled (uninstalled) at any time.
Please refer to step S12, a hardware identification code of the backlight keyboard is obtained. Specifically, after detecting that the backlight keyboard is connected to the host, the hardware identification code of the backlight keyboard is automatically detected through an embedded program which is already running in an operating system. The hardware identification code comprises a Product identification code (Product ID, PID) and a supplier identification code (vendor ID, VID).
Referring to step S13, the embedded program determines whether the hardware id is included in the id list itself. In other words, the embedded program checks whether the model of the backlight keyboard supported by itself includes the currently connected backlight keyboard. In practice, in addition to automatically checking the self-stored identification code list through the embedded program, the user can also select the model of the backlight keyboard electrically connected to the host from the list. Later, when the user additionally purchases a newly pushed backlight keyboard and connects to the host, the newly pushed backlight keyboard can be supported by updating the embedded program.
Please refer to step S14 and step S15. If it is determined in step S13 that the hardware id of the keyboard connected to the host is not in the id list built in the embedded program, for example, the keyboard connected to the host is not a backlight keyboard but a normal keyboard, in this case, as shown in step S14, a standard keyboard mode is entered, i.e., the embedded program loads a configuration file of a standard keyboard on the market, and the configuration file does not include instructions or program codes for controlling the light-emitting units. Conversely, if it is determined in step S13 that the identification code list includes the hardware identification code of the backlight keyboard connected to the host, it indicates that the backlight keyboard supports the subsequent operations of the embedded program, and therefore, in step S15, the embedded program enters the custom keyboard mode and starts to detect whether the user sends a mode signal.
Referring to step S151, it is determined whether the mode signal obtained in step S15 indicates the universal mode. The mode signal is generated by clicking a status window presented on the screen by the user, or by pressing a special key on the backlight keyboard or a key combination formed by a pre-designated single key or a plurality of keys by the user. The embedded program signals a corresponding mode based on the mode selected by the user. In particular, the mode signal may be used to indicate two modes: a general mode and a custom mode. When the mode signal indicates the general mode, in step S152, the embedded program loads the general configuration file and controls the backlight module to emit light according to the general configuration file. Basically, the general profile is applicable to the lighting profiles of all applications executable in the host, in which the lighting mode preset by the manufacturer of the backlight keyboard before factory shipment is stored, for example, flashing when a key is pressed, and adjusting the brightness of the backlight keyboard in a breathing lamp manner when the key is not pressed. On the other hand, when the mode signal is designated as the custom mode, the embedded program loads the custom configuration file corresponding to the application program according to the application program currently executed by the host computer, as described in detail below.
Referring to step S21, a foreground application is detected. In detail, the foreground application is an application being operated by a user in an operating system running after the host computer is turned on, and the application is in a foreground window (formed window) due to the user operation. The Operating System (OS) may be, for example, Microsoft Windows or Apple Mac OS, but the type of the operating System is not limited thereto. In addition, supplementary notes are: after step S13 is completed, that is, after the embedded program confirms that the hardware identification code of the backlight keyboard currently connected to the host computer has the identification code list, the embedded program can start to acquire the mode signal; and when the mode signal obtained by the embedded program indicates a self-defined keyboard mode and is not applicable to a general mode, the detection of the foreground application program is further carried out. This means that the embedded program will perform foreground application detection and its subsequent steps only if the specified backlit keyboard supported by the embedded program is connected to the host and the user decides to have the backlit keyboard operate according to the custom lighting profile and not use the generic mode.
Referring to step S16, it is determined whether there is a custom configuration file in the configuration file list, and the custom configuration file corresponds to the application program detected in step S21. Specifically, in the flow from step S13 to step S15, the embedded program has confirmed that the hardware id of the keyboard exists in the id list. Next, at step S21, the embedded program confirms which foreground application is. Then, in step S16, the embedded program searches the configuration file list corresponding to the hardware identifier according to the detected application program. In practice, a plurality of configuration file lists can be stored in the embedded program, and different configuration file lists correspond to backlight keyboards of different models. Each configuration file list comprises at least one light-emitting configuration file, wherein one light-emitting configuration file is a preset configuration file of an original factory, and the rest light-emitting configuration files are self-defined configuration files. The custom profile is, for example, a lighting profile set by the user himself via an embedded program. The preset configuration file is, for example, a preset (or updated) lighting configuration file in an embedded program, or a lighting configuration file downloaded by a user from a website of an original factory at a later date. It should be emphasized that each custom configuration file corresponds to an application running on the same host computer, and the default configuration file may correspond to an application as the custom configuration file or be common to all applications. The application programs include communication software such as Skype …, document software such as Word, Excel …, and multimedia playing software such as potlayer …, but the invention is not limited to the type of application programs.
Please refer to step S221 and step S222. If the embedded program determines in step S16 that the configuration file list only has one default configuration file and does not have any custom configuration file, the embedded program loads the default configuration file as the custom configuration file in step S221. Otherwise, as stated in step S222, the embedded program loads the custom configuration file to facilitate the subsequent control of the backlight module of the keyboard.
Any one of the general configuration files, the preset configuration files or the user-defined configuration files comprises adjustable and controllable light-emitting setting options of each light-emitting unit in the backlight module. For example: the user can set the flashing speed and the flashing period of the light-emitting unit; or the light emitting direction of the light emitting array composed of a plurality of light emitting units (for example, from top to bottom, from left to right …, and so on) can be set by itself, the common light emitting mode (for example, a horse race lamp, a spectrum lamp, a colorful lamp, a ripple lamp …, and so on) or the special light emitting effect (for example, a wave lamp, a breathing lamp, a heartbeat lamp), and so on. In practice, the embedded program may provide a graphical interface, such as the aforementioned status window, for the user to select the setting values to be adopted for each lighting mode detail, convert these setting values into instructions or program code segments for controlling the lighting units, and store the conversion results as a custom configuration file.
Please refer to fig. 2, which shows a flowchart of dynamically adjusting the backlight keyboard lighting mode according to an embodiment of the present invention. Referring to step S21, a foreground application is detected. This step is identical to step S21 of fig. 1, and will not be described herein again.
Please refer to step S22, a custom configuration file corresponding to the application program is obtained. This step corresponds to step S221 and step S222 in fig. 1. In short, the user-defined configuration file is a preset configuration file or a user-defined configuration file. When the configuration file list has a user-defined configuration file corresponding to the foreground application program, the embedded program loads the user-defined configuration file; otherwise, loading a preset configuration file as a self-defined configuration file.
Please refer to step S23, "control the backlight module to emit light according to the custom configuration file or the preset configuration file". In detail, on the premise that the foreground window is not switched by the user, if the user selects the custom mode in step S151, in this step S23, the embedded program controls the backlight module of the keyboard to emit light according to the custom configuration file (the preset configuration file or the custom configuration file) loaded in step S22.
Referring to step S27, it is determined whether to switch another application. In detail, after step S23 is completed, the embedded program checks whether the foreground window at this time has been switched by the user. If so, go back to step S21 to detect which application program is currently in the foreground window, and then execute the method for dynamically adjusting the backlight keyboard lighting mode according to the flow of the aforementioned steps S21-S23. Conversely, if the user does not switch the currently operating application program, the process returns to step S23, and the embedded program continues to control the light-emitting unit of the backlight module to perform the pre-specified light-emitting mode according to the currently loaded light-emitting configuration file. It should be noted that the present invention also retains the way for the user to switch between the general mode and the custom mode. Specifically, after the execution of step S27, if the determination result is "no", the process returns to step S151 to determine again whether the user has changed from the custom mode to the general mode. The flow of the aforementioned step S21 to step S23 is then resumed.
Through the method for dynamically adjusting the keyboard output signal introduced in steps S21-S27, the user saves the time that the user has to reload the lighting configuration file by himself when switching different applications, and the flexibility of the user in switching between the general mode and the user-defined mode is also increased.
In summary, the method for dynamically adjusting the light-emitting mode of the backlight keyboard of the present invention can detect the backlight keyboard currently connected to the host through the embedded program. When the model of the backlight keyboard is confirmed to be supportable and the user selects the custom mode, loading a custom light-emitting configuration file corresponding to the model of the backlight keyboard and the application program according to the application program which is currently operated by the user and is positioned in the foreground so as to control the backlight module to operate according to the custom light-emitting mode in real time. The invention can adapt to different application programs to automatically switch to the light-emitting configuration files corresponding to the application programs, so that a user can set detailed setting items in the light-emitting configuration files preferred by the user for each application program without being limited by only a few light-emitting modes on the original backlight keyboard. In addition to the above-mentioned custom mode, the present invention also provides a common mode and corresponding common configuration file suitable for all applications. Generally speaking, the method for dynamically adjusting the backlight keyboard light-emitting mode described in the invention can make the backlight module of the backlight keyboard operate each light-emitting unit in real time according to the setting of the light-emitting configuration file according to the difference of the keyboard models on hardware and the difference of the application programs on software, thereby providing more diversified light visual effects and bringing smoother operation experience to users.
The present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof, and it should be understood that various changes and modifications can be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.