Laptop keyboard control method and system based on LCD touch screen and medium
By using a keyboard control method based on an LCD touchscreen, the user's touch coordinates are scanned and calibrated in real time, a keyboard scan code is generated and sent to the host, solving the problems of fixed layout and wear and tear of traditional laptop keyboards, and realizing dynamic layout switching and efficient input with low power consumption.
Patent Information
- Application Number
- CN202511118517.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-11-25
AI Technical Summary
Traditional laptop physical keyboards cannot dynamically adjust the key layout, suffer from wear and tear, have high input latency, and limited functional expansion, failing to meet the needs of efficient input.
It adopts a keyboard control method based on LCD touch screen, which obtains and calibrates the user's touch coordinates by scanning the touch area in real time, analyzes the keyboard layout, generates keyboard scan codes and sends them to the host, supports dynamic layout switching and power consumption management, and improves input accuracy by combining vibration feedback mechanism.
It enables flexible configuration of keyboard layout, improves input accuracy and user experience, reduces power consumption, and solves the problems of fixed layout and wear and tear of traditional keyboards.
Smart Images

Figure CN121008697A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of keyboard control technology, and more specifically, to a method, system, and medium for controlling a laptop keyboard based on an LCD touchscreen. Background Technology
[0002] Traditional laptop physical keyboards have the following drawbacks: The layout is fixed and cannot be dynamically adjusted according to user needs or scenarios (e.g., switching between Chinese and English input depends on the input method, and the button display cannot be changed intuitively). The physical buttons are worn out, and the key symbols become blurred after long-term use; In ultra-thin laptop design, the thickness of the physical keyboard limits the device's ability to become thinner and lighter. Functionality is limited, and it is not possible to switch between dedicated shortcut key layouts according to application scenarios (such as games and office work).
[0003] Existing virtual keyboard technologies (such as mobile phone screen keyboards) suffer from high input latency, high accidental touch rates, and a lack of haptic feedback, making it difficult to meet the efficient input requirements of laptops. Therefore, a new keyboard system and control method that balances dynamic configurability, input accuracy, and user experience is needed. Summary of the Invention
[0004] The purpose of this application is to provide a method, system, and medium for controlling a laptop keyboard based on an LCD touchscreen. By collecting and preprocessing touch signals, identifying keys and their states, generating scan codes and sending them to the host, a feedback mechanism is triggered. It also supports dynamic layout switching and power management, enabling flexible configuration of the keyboard layout, improving input accuracy and user experience, and reducing power consumption.
[0005] This application also provides a method for controlling a laptop keyboard based on an LCD touchscreen, including: The system scans the touch area in real time to obtain touch signals, acquires the original coordinate signals of the user's touch based on the touch signals, and outputs valid coordinates after filtering and calibration. Acquire keyboard layout data, analyze the keyboard area, compare the effective coordinates with the key area, and determine the touched key and its state, including single click, long press, or key combination. Based on the key and status query key value mapping table, generate the corresponding keyboard scan code and send the keyboard scan code to the laptop host; The highlighted areas of the keyboard keys are obtained by generating matching vibration frequencies based on the keyboard scan codes. Load the target keyboard layout data based on the highlighted areas of the keyboard keys and update the displayed content.
[0006] Optionally, in the laptop keyboard control method based on an LCD touchscreen described in this application embodiment, the touch area is scanned in real time to obtain touch signals, the original coordinate signals of the user's touch are obtained based on the touch signals, and the valid coordinates are output after filtering and calibration, specifically including: The original coordinate signal is acquired, and the abnormal coordinates caused by environmental noise and touch jitter are eliminated based on the Kalman filter algorithm to obtain the factory calibration result; A mapping relationship between physical coordinates and screen pixel coordinates is established based on preset calibration points; The coordinate deviation of the calibration point displayed when the screen is clicked is analyzed based on the mapping relationship between physical coordinates and screen pixel coordinates. The physical coordinates are corrected based on the coordinate deviation to obtain the user calibration result; Output valid coordinates based on factory calibration results and user calibration results.
[0007] Optionally, in the laptop keyboard control method based on an LCD touchscreen described in this application embodiment, acquiring keyboard layout data, analyzing the keyboard area, comparing the effective coordinates with the key area, and determining the touched key and its state specifically includes: Acquire keyboard layout data, and analyze the unique identifier information of the keys, the boundary coordinate parameters of the keys in the screen coordinate system, and the functional attributes of the keys based on the keyboard layout data; The keyboard display area is divided into multiple independent key areas based on the boundary coordinate parameters. A key area index table is established, which records the mapping relationship between the spatial location range of each key area and the unique identifier of the corresponding key. Obtain valid coordinates, compare the valid coordinates with each key area, and determine the target key area to which the valid coordinates belong and the corresponding unique key identifier information; Obtain the touch duration, position change, and multi-touch point association of the button; The operation state of the buttons is analyzed based on the duration of touch, position changes, and the relationship between multiple touch points to obtain the touched buttons and their states.
[0008] Optionally, in the laptop keyboard control method based on an LCD touchscreen described in this application embodiment, generating a corresponding keyboard scan code by querying the key value mapping table according to the key and status, and sending the keyboard scan code to the laptop host, specifically includes: Construct a status query key-value mapping table, obtain key feature data, and extract static and dynamic features. The static features include: unique key identifier, current layout identifier, and attribute keys. The attribute keys include ordinary keys, modifier keys, and function keys. The dynamic features include operation state parameters, which include duration, movement trajectory, and multi-key correlation. Based on static features, the basic key value is extracted from the primary key value index. Based on dynamic features, the state transition matrix is queried, and the corresponding transition function is called to process the basic key value. Based on the state query key-value mapping table analysis, a keyboard scan code is generated from the basic key values.
[0009] Optionally, in the laptop keyboard control method based on an LCD touchscreen described in this application embodiment, generating a matching vibration frequency based on the keyboard scan code to obtain the highlighted area of the keyboard keys specifically includes: Establish a mapping relationship between scan codes and feedback parameters to obtain a correspondence table between scan code type and vibration frequency and the coordinate rules of the key area corresponding to the scan code; The screen pixel coordinate range corresponding to different key values is defined based on the correspondence table between scan code type and vibration frequency and the coordinate rules of the key area corresponding to the scan code. Obtain the generated keyboard scan code and the unique identifier of the corresponding key, and parse the keyboard scan code type; The fundamental vibration frequency is determined by querying the mapping relationship based on the scan code type. The real-time vibration frequency of the key is generated based on the key operation state. The real-time vibration frequency is compared with the basic vibration frequency to obtain the highlighted area of the keyboard key.
[0010] Optionally, in the laptop keyboard control method based on an LCD touchscreen described in this application embodiment, loading target keyboard layout data and updating the display content based on the highlighted areas of the keyboard keys specifically includes: The target key is obtained by analyzing the highlighted areas of the keyboard keys. Acquire relevant data about the target key and analyze its specific position and identifier in the keyboard layout; Based on the specific location and label of the target key, the corresponding target layout data is read from the pre-stored keyboard layout data; Apply the target layout data to the display interface.
[0011] Secondly, embodiments of this application provide a laptop keyboard control system based on an LCD touchscreen. The system includes a memory and a processor. The memory includes a program for a laptop keyboard control method based on an LCD touchscreen. When the program for the laptop keyboard control method based on an LCD touchscreen is executed by the processor, it implements the following steps: The system scans the touch area in real time to obtain touch signals, acquires the original coordinate signals of the user's touch based on the touch signals, and outputs valid coordinates after filtering and calibration. Acquire keyboard layout data, analyze the keyboard area, compare the effective coordinates with the key area, and determine the touched key and its state, including single click, long press, or key combination. Based on the key and status query key value mapping table, generate the corresponding keyboard scan code and send the keyboard scan code to the laptop host; The highlighted areas of the keyboard keys are obtained by generating matching vibration frequencies based on the keyboard scan codes. Load the target keyboard layout data based on the highlighted areas of the keyboard keys and update the displayed content.
[0012] Optionally, in the laptop keyboard control system based on an LCD touchscreen described in this application embodiment, the touch area is scanned in real time to obtain touch signals, the original coordinate signals of the user's touch are obtained based on the touch signals, and the valid coordinates are output after filtering and calibration, specifically including: The original coordinate signal is acquired, and the abnormal coordinates caused by environmental noise and touch jitter are eliminated based on the Kalman filter algorithm to obtain the factory calibration result; A mapping relationship between physical coordinates and screen pixel coordinates is established based on preset calibration points; The coordinate deviation of the calibration point displayed when the screen is clicked is analyzed based on the mapping relationship between physical coordinates and screen pixel coordinates. The physical coordinates are corrected based on the coordinate deviation to obtain the user calibration result; Output valid coordinates based on factory calibration results and user calibration results.
[0013] Optionally, in the laptop keyboard control system based on an LCD touchscreen described in this application embodiment, acquiring keyboard layout data, analyzing the keyboard area, comparing the effective coordinates with the key area, and determining the touched key and its state specifically includes: Acquire keyboard layout data, and analyze the unique identifier information of the keys, the boundary coordinate parameters of the keys in the screen coordinate system, and the functional attributes of the keys based on the keyboard layout data; The keyboard display area is divided into multiple independent key areas based on the boundary coordinate parameters. A key area index table is established, which records the mapping relationship between the spatial location range of each key area and the unique identifier of the corresponding key. Obtain valid coordinates, compare the valid coordinates with each key area, and determine the target key area to which the valid coordinates belong and the corresponding unique key identifier information; Obtain the touch duration, position change, and multi-touch point association of the button; The operation state of the buttons is analyzed based on the duration of touch, position changes, and the relationship between multiple touch points to obtain the touched buttons and their states.
[0014] Thirdly, embodiments of this application also provide a computer-readable storage medium, which includes a laptop keyboard control method program based on an LCD touchscreen. When the laptop keyboard control method program based on an LCD touchscreen is executed by a processor, it implements the steps of the laptop keyboard control method based on an LCD touchscreen as described in any of the preceding claims.
[0015] As can be seen from the above, the laptop keyboard control method, system, and medium based on an LCD touchscreen provided in this application obtains touch signals by scanning the touch area in real time, acquires the original coordinate signals of the user's touch based on the touch signals, and outputs valid coordinates after filtering and calibration; acquires keyboard layout data, analyzes the keyboard area, compares the valid coordinates with the key area to determine the touched key and its state, the state including single click, long press, or combination key; queries the key value mapping table according to the key and state to generate the corresponding keyboard scan code, and sends the keyboard scan code to the laptop host; generates a matching vibration frequency based on the keyboard scan code to obtain the highlighted area of the keyboard key; loads the target keyboard layout data and updates the display content based on the highlighted area of the keyboard key; by acquiring and preprocessing touch signals, identifying keys and states, generating scan codes and sending them to the host, a feedback mechanism is triggered, and dynamic layout switching and power consumption management are supported, realizing flexible configuration of the keyboard layout, improving input accuracy and user experience, and reducing power consumption. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating a laptop keyboard control method based on an LCD touchscreen provided in an embodiment of this application; Figure 2 A flowchart illustrating the effective coordinate determination method for a laptop keyboard control method based on an LCD touchscreen, provided in an embodiment of this application. Figure 3 A flowchart illustrating the touch key determination and state analysis of a laptop keyboard control method based on an LCD touchscreen provided in this application embodiment. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0019] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0020] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a laptop keyboard control method based on an LCD touchscreen, according to some embodiments of this application. This LCD touchscreen-based laptop keyboard control method is used in a terminal device and includes the following steps: S101 scans the touch area in real time to obtain touch signals, acquires the original coordinate signals of the user's touch based on the touch signals, and outputs valid coordinates after filtering and calibration; S102, acquire keyboard layout data, analyze the keyboard area, compare the valid coordinates with the key area, and determine the touched key and its state, including single click, long press or combination key; S103: Based on the key press and status, query the key value mapping table, generate the corresponding keyboard scan code, and send the keyboard scan code to the laptop host. S104, based on the keyboard scan code, generates a matching vibration frequency to obtain the highlighted area of the keyboard keys; S105 loads target keyboard layout data based on the highlighted areas of keyboard keys and updates the displayed content.
[0021] It should be noted that during system initialization, the microprocessor loads the default keyboard layout data from the storage unit, controls the display unit to display the corresponding keyboard pattern through the display driver, and initializes the key value mapping table; Touch signal acquisition and preprocessing: The touch unit scans the keyboard display area in real time, and outputs the original touch coordinate signal when it detects a user touch operation; The touch controller filters and calibrates the original touch coordinate signal, and outputs the valid coordinate information to the microprocessor; Key recognition and status determination: The microprocessor calls the key data of the current keyboard layout, compares the valid coordinate information with the boundary coordinate range of each key, and determines the target key; at the same time, it determines the operation status based on the touch duration and position change, the operation status including single click, long press, swipe to switch, and combination key input; Key value conversion and instruction transmission: The microprocessor queries the key value mapping table based on the target key and operation status to generate corresponding key value information; the host interaction module converts the key value information into a standard keyboard scan code conforming to the USB HID protocol and transmits it to the laptop host.
[0022] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating an effective coordinate determination method for a laptop keyboard control method based on an LCD touchscreen, as described in some embodiments of this application. According to embodiments of the present invention, the touch area is scanned in real time to obtain touch signals. Based on the touch signals, the original coordinate signals of the user's touch are acquired, and after filtering and calibration, effective coordinates are output. Specifically, this includes: S201, acquire the original coordinate signal, eliminate abnormal coordinates caused by environmental noise and touch jitter based on the Kalman filter algorithm, and obtain the factory calibration result; S202, establishes a mapping relationship between physical coordinates and screen pixel coordinates based on preset calibration points; S203, Analyze the coordinate deviation of the calibration point displayed when the screen is clicked based on the mapping relationship between physical coordinates and screen pixel coordinates; S204, Correct the physical coordinates based on the coordinate deviation to obtain the user calibration result; S205 outputs valid coordinates based on factory calibration results and user calibration results.
[0023] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating the touch key determination and state analysis of a laptop keyboard control method based on an LCD touchscreen, according to some embodiments of this application. According to embodiments of the present invention, keyboard layout data is acquired, the keyboard area is analyzed, and the effective coordinates are compared with the key area to determine the touched key and its state. Specifically, this includes: S301, acquire keyboard layout data, and analyze the unique identification information of the keys, the boundary coordinate parameters of the keys in the screen coordinate system, and the functional attributes of the keys based on the keyboard layout data; S302, the keyboard display area is divided into multiple independent key areas according to the boundary coordinate parameters, and a key area index table is established. The index table records the mapping relationship between the spatial location range of each key area and the unique identifier of the corresponding key. S303, Obtain valid coordinates, compare the valid coordinates with each key area, and determine the target key area to which the valid coordinates belong and the corresponding unique key identifier information; S304, obtain the touch duration, position change and multi-touch point association of the button; S305 analyzes the operation state of the button based on the touch duration, position change, and the relationship between multiple touch points to obtain the touched button and its state.
[0024] It should be noted that the keyboard layout data includes: Unique identification information for each button; The boundary coordinate parameters of each button in the screen coordinate system, wherein the boundary coordinate parameters include at least the coordinates of the top left vertex (x1, y1) and the coordinates of the bottom right vertex (x2, y2); The functional attributes of each button, including basic key values, key combination mapping relationships, and long press response rules; The keyboard area is analyzed, and the keyboard display area is divided into multiple independent key areas according to the boundary coordinate parameters. A key area index table is established, and the index table records the mapping relationship between the spatial position range of each key area and the unique identifier of the corresponding key. Obtain valid touch coordinates, which are the pixel coordinates (x, y) of the touch point after noise filtering and coordinate calibration; The effective touch coordinates are compared with the button area, specifically including: Traverse the key area index table and determine whether the effective touch coordinates (x, y) satisfy the conditions x1≤x≤x2 and y1≤y≤y2; If the above conditions are met, the target button area to which the effective touch coordinates belong and the corresponding unique button identifier are determined; If the conditions of multiple button areas are met simultaneously (the coordinates are located at the overlapping area), the button area with the largest area ratio is selected as the target button area. The touched button and its operation state are determined. Based on the touch duration, position change, and the relationship between multiple touch points, the operation state of the target button is determined. The operation state includes single click, long press, combination trigger, and swipe to switch.
[0025] According to an embodiment of the present invention, a corresponding keyboard scan code is generated by querying a key value mapping table based on the key press and status, and the keyboard scan code is sent to the laptop host, specifically including: Construct a status query key-value mapping table, obtain button feature data, and extract static and dynamic features. Static features include: unique button identifier, current layout identifier, and attribute buttons. Attribute buttons include normal buttons, modifier buttons, and function buttons. Dynamic features include operation state parameters, which include duration, movement trajectory, and multi-key correlation. Based on static features, the basic key value is extracted from the primary key value index. Based on dynamic features, the state transition matrix is queried, and the corresponding transition function is called to process the basic key value. Based on the state query key-value mapping table analysis, a keyboard scan code is generated from the basic key values.
[0026] It should be noted that the status query key-value mapping table includes: Primary key value index: A table showing the correspondence between the unique identifier of a key and its basic key value, supporting one-to-many mapping (the same key corresponds to different key values in different layouts); State transition matrix: Defines the mapping relationship between operation state (single / long press / combined) and key value output mode. The matrix elements are state-key value transition functions. Protocol conversion table: Stores a bidirectional mapping between key values and input protocol (USB HID / Bluetooth HID) scan codes.
[0027] According to an embodiment of the present invention, a matching vibration frequency is generated based on the keyboard scan code to obtain the highlighted area of the keyboard keys, specifically including: Establish a mapping relationship between scan codes and feedback parameters to obtain a correspondence table between scan code type and vibration frequency and the coordinate rules of the key area corresponding to the scan code; The screen pixel coordinate range corresponding to different key values is defined based on the correspondence table between scan code type and vibration frequency and the coordinate rules of the key area corresponding to the scan code. Obtain the generated keyboard scan code and the unique identifier of the corresponding key, and parse the keyboard scan code type; The fundamental vibration frequency is determined by querying the mapping relationship based on the scan code type. The real-time vibration frequency of the key is generated based on the key operation state. The real-time vibration frequency is compared with the basic vibration frequency to obtain the highlighted area of the keyboard key.
[0028] It should be noted that the mapping relationship between the scan code and the feedback parameters is established, and the mapping relationship includes: A table showing the correspondence between scan code types and vibration frequencies, where standard character scan codes correspond to vibration frequencies of 100-200Hz, composite scan codes correspond to vibration frequencies of 200-300Hz, and extended function scan codes correspond to vibration frequencies of 150-250Hz. The rules for the coordinates of the key area corresponding to the scan code define the range of screen pixel coordinates corresponding to different key values.
[0029] According to an embodiment of the present invention, loading target keyboard layout data based on the highlighted areas of keyboard keys and updating the displayed content specifically includes: The target key is obtained by analyzing the highlighted areas of the keyboard keys. Acquire relevant data about the target key and analyze its specific position and identifier in the keyboard layout; Based on the specific location and label of the target key, the corresponding target layout data is read from the pre-stored keyboard layout data; Apply the target layout data to the display interface.
[0030] It's important to explain how to determine the mapping between highlighted areas and keys: In the keyboard layout data, each key has its corresponding coordinate range and other positional information. When a key is pressed or highlighted, the relevant data of that highlighted key can be obtained using the previously used methods to determine the key and its state, clarifying its specific position and identifier within the keyboard layout. For example, in a virtual keyboard layout, each key is represented by a rectangular area. By recording the coordinates of the top-left and bottom-right corners of each rectangle, its position can be determined. When a key is highlighted, the corresponding rectangular area coordinates can be found based on the mouse click location or the key code.
[0031] Loading target keyboard layout data: Based on the identifier or related information of the highlighted key, the corresponding target layout data is read from the pre-stored keyboard layout data. This data can be a data structure stored in memory or configuration information read from a file. For example, if the system supports multiple language keyboard layouts, when a language switch key is pressed and highlighted, the corresponding language keyboard layout data is loaded from the language layout configuration file based on the key's identifier. This data may contain information such as the characters and symbols corresponding to each key.
[0032] Update Display Content: Apply the loaded target keyboard layout data to the display interface. For programs developed using graphical user interface libraries (such as Qt, Win32 API, etc.), the properties of interface elements can be modified using corresponding functions. For example, when using Qt, the QWidget object corresponding to a key can be obtained, and its text content, style, etc., can be modified to display the character or symbol that the key should display under the new layout. For virtual keyboards in web pages, JavaScript can be used to manipulate DOM elements and update the innerHTML and other properties of the key elements according to the new layout data, thereby updating the displayed content.
[0033] Secondly, embodiments of this application provide a laptop keyboard control system based on an LCD touchscreen. The system includes a memory and a processor. The memory includes a program for a laptop keyboard control method based on an LCD touchscreen. When the program for the laptop keyboard control method based on an LCD touchscreen is executed by the processor, it implements the following steps: The system scans the touch area in real time to obtain touch signals, acquires the original coordinate signals of the user's touch based on the touch signals, and outputs valid coordinates after filtering and calibration. Acquire keyboard layout data, analyze the keyboard area, compare the valid coordinates with the key area, and determine the touched key and its state, including single click, long press, or key combination. Based on the key presses and status, query the key value mapping table, generate the corresponding keyboard scan code, and send the keyboard scan code to the laptop host. The highlighted areas of the keyboard keys are obtained by generating matching vibration frequencies based on the keyboard scan codes. Load the target keyboard layout data based on the highlighted areas of the keyboard keys and update the displayed content.
[0034] It should be noted that during system initialization, the microprocessor loads the default keyboard layout data from the storage unit, controls the display unit to display the corresponding keyboard pattern through the display driver, and initializes the key value mapping table; Touch signal acquisition and preprocessing: The touch unit scans the keyboard display area in real time, and outputs the original touch coordinate signal when it detects a user touch operation; The touch controller filters and calibrates the original touch coordinate signal, and outputs the valid coordinate information to the microprocessor; Key recognition and status determination: The microprocessor calls the key data of the current keyboard layout, compares the valid coordinate information with the boundary coordinate range of each key, and determines the target key; at the same time, it determines the operation status based on the touch duration and position change, the operation status including single click, long press, swipe to switch, and combination key input; Key value conversion and instruction transmission: The microprocessor queries the key value mapping table based on the target key and operation status to generate corresponding key value information; the host interaction module converts the key value information into a standard keyboard scan code conforming to the USB HID protocol and transmits it to the laptop host.
[0035] According to an embodiment of the present invention, the touch area is scanned in real time to obtain touch signals, the original coordinate signals of the user's touch are obtained based on the touch signals, and the valid coordinates are output after filtering and calibration, specifically including: The original coordinate signal is acquired, and the abnormal coordinates caused by environmental noise and touch jitter are eliminated based on the Kalman filter algorithm to obtain the factory calibration result; A mapping relationship between physical coordinates and screen pixel coordinates is established based on preset calibration points; The coordinate deviation of the calibration point displayed when the screen is clicked is analyzed based on the mapping relationship between physical coordinates and screen pixel coordinates. The physical coordinates are corrected based on the coordinate deviation to obtain the user calibration result; Output valid coordinates based on factory calibration results and user calibration results.
[0036] According to an embodiment of the present invention, keyboard layout data is acquired, the keyboard area is analyzed, and the effective coordinates are compared with the key area to determine the touched key and its state, specifically including: Acquire keyboard layout data, and analyze the unique identifier information of the keys, the boundary coordinate parameters of the keys in the screen coordinate system, and the functional attributes of the keys based on the keyboard layout data; The keyboard display area is divided into multiple independent key areas based on the boundary coordinate parameters. A key area index table is established, which records the mapping relationship between the spatial location range of each key area and the unique identifier of the corresponding key. Obtain valid coordinates, compare the valid coordinates with each key area, and determine the target key area to which the valid coordinates belong and the corresponding unique key identifier information; Obtain the touch duration, position change, and multi-touch point association of the button; The operation state of the buttons is analyzed based on the duration of touch, position changes, and the relationship between multiple touch points to obtain the touched buttons and their states.
[0037] It should be noted that the keyboard layout data includes: Unique identification information for each button; The boundary coordinate parameters of each button in the screen coordinate system, wherein the boundary coordinate parameters include at least the coordinates of the top left vertex (x1, y1) and the coordinates of the bottom right vertex (x2, y2); The functional attributes of each button, including basic key values, key combination mapping relationships, and long press response rules; The keyboard area is analyzed, and the keyboard display area is divided into multiple independent key areas according to the boundary coordinate parameters. A key area index table is established, and the index table records the mapping relationship between the spatial position range of each key area and the unique identifier of the corresponding key. Obtain valid touch coordinates, which are the pixel coordinates (x, y) of the touch point after noise filtering and coordinate calibration; The effective touch coordinates are compared with the button area, specifically including: Traverse the key area index table and determine whether the effective touch coordinates (x, y) satisfy the conditions x1≤x≤x2 and y1≤y≤y2; If the above conditions are met, the target button area to which the effective touch coordinates belong and the corresponding unique button identifier are determined; If the conditions of multiple button areas are met simultaneously (the coordinates are located at the overlapping area), the button area with the largest area ratio is selected as the target button area. The touched button and its operation state are determined. Based on the touch duration, position change, and the relationship between multiple touch points, the operation state of the target button is determined. The operation state includes single click, long press, combination trigger, and swipe to switch.
[0038] According to an embodiment of the present invention, a corresponding keyboard scan code is generated by querying a key value mapping table based on the key press and status, and the keyboard scan code is sent to the laptop host, specifically including: Construct a status query key-value mapping table, obtain button feature data, and extract static and dynamic features. Static features include: unique button identifier, current layout identifier, and attribute buttons. Attribute buttons include normal buttons, modifier buttons, and function buttons. Dynamic features include operation state parameters, which include duration, movement trajectory, and multi-key correlation. Based on static features, the basic key value is extracted from the primary key value index. Based on dynamic features, the state transition matrix is queried, and the corresponding transition function is called to process the basic key value. Based on the state query key-value mapping table analysis, a keyboard scan code is generated from the basic key values.
[0039] It should be noted that the status query key-value mapping table includes: Primary key value index: A table showing the correspondence between the unique identifier of a key and its basic key value, supporting one-to-many mapping (the same key corresponds to different key values in different layouts); State transition matrix: Defines the mapping relationship between operation state (single / long press / combined) and key value output mode. The matrix elements are state-key value transition functions. Protocol conversion table: Stores a bidirectional mapping between key values and input protocol (USB HID / Bluetooth HID) scan codes.
[0040] According to an embodiment of the present invention, a matching vibration frequency is generated based on the keyboard scan code to obtain the highlighted area of the keyboard keys, specifically including: Establish a mapping relationship between scan codes and feedback parameters to obtain a correspondence table between scan code type and vibration frequency and the coordinate rules of the key area corresponding to the scan code; The screen pixel coordinate range corresponding to different key values is defined based on the correspondence table between scan code type and vibration frequency and the coordinate rules of the key area corresponding to the scan code. Obtain the generated keyboard scan code and the unique identifier of the corresponding key, and parse the keyboard scan code type; The fundamental vibration frequency is determined by querying the mapping relationship based on the scan code type. The real-time vibration frequency of the key is generated based on the key operation state. The real-time vibration frequency is compared with the basic vibration frequency to obtain the highlighted area of the keyboard key.
[0041] It should be noted that the mapping relationship between the scan code and the feedback parameters is established, and the mapping relationship includes: A table showing the correspondence between scan code types and vibration frequencies, where standard character scan codes correspond to vibration frequencies of 100-200Hz, composite scan codes correspond to vibration frequencies of 200-300Hz, and extended function scan codes correspond to vibration frequencies of 150-250Hz. The rules for the coordinates of the key area corresponding to the scan code define the range of screen pixel coordinates corresponding to different key values.
[0042] According to an embodiment of the present invention, loading target keyboard layout data based on the highlighted areas of keyboard keys and updating the displayed content specifically includes: The target key is obtained by analyzing the highlighted areas of the keyboard keys. Acquire relevant data about the target key and analyze its specific position and identifier in the keyboard layout; Based on the specific location and label of the target key, the corresponding target layout data is read from the pre-stored keyboard layout data; Apply the target layout data to the display interface.
[0043] It's important to explain how to determine the mapping between highlighted areas and keys: In the keyboard layout data, each key has its corresponding coordinate range and other positional information. When a key is pressed or highlighted, the relevant data of that highlighted key can be obtained using the previously used methods to determine the key and its state, clarifying its specific position and identifier within the keyboard layout. For example, in a virtual keyboard layout, each key is represented by a rectangular area. By recording the coordinates of the top-left and bottom-right corners of each rectangle, its position can be determined. When a key is highlighted, the corresponding rectangular area coordinates can be found based on the mouse click location or the key code.
[0044] Loading target keyboard layout data: Based on the identifier or related information of the highlighted key, the corresponding target layout data is read from the pre-stored keyboard layout data. This data can be a data structure stored in memory or configuration information read from a file. For example, if the system supports multiple language keyboard layouts, when a language switch key is pressed and highlighted, the corresponding language keyboard layout data is loaded from the language layout configuration file based on the key's identifier. This data may contain information such as the characters and symbols corresponding to each key.
[0045] Update Display Content: Apply the loaded target keyboard layout data to the display interface. For programs developed using graphical user interface libraries (such as Qt, Win32 API, etc.), the properties of interface elements can be modified using corresponding functions. For example, when using Qt, the QWidget object corresponding to a key can be obtained, and its text content, style, etc., can be modified to display the character or symbol that the key should display under the new layout. For virtual keyboards in web pages, JavaScript can be used to manipulate DOM elements and update the innerHTML and other properties of the key elements according to the new layout data, thereby updating the displayed content.
[0046] A third aspect of the present invention provides a computer-readable storage medium including a program for a laptop keyboard control method based on an LCD touchscreen. When the program for the laptop keyboard control method based on an LCD touchscreen is executed by a processor, it implements the steps of the laptop keyboard control method based on an LCD touchscreen as described in any of the above claims.
[0047] This invention discloses a method, system, and medium for controlling a laptop keyboard based on an LCD touchscreen. The method involves real-time scanning of the touch area to obtain touch signals, acquiring the original coordinate signals of the user's touch based on these signals, filtering and calibrating them to output valid coordinates, acquiring keyboard layout data, analyzing the keyboard area, comparing the valid coordinates with the key areas to determine the touched key and its state (including single click, long press, or key combination), querying a key value mapping table based on the key and its state to generate a corresponding keyboard scan code, and sending the keyboard scan code to the laptop host, generating a matching vibration frequency based on the keyboard scan code to obtain the highlighted areas of the keyboard keys, loading target keyboard layout data based on the highlighted areas of the keyboard keys, and updating the display content. By acquiring and preprocessing touch signals, identifying keys and their states, generating scan codes, and sending them to the host, a feedback mechanism is triggered. The method also supports dynamic layout switching and power management, enabling flexible configuration of the keyboard layout, improving input accuracy and user experience, and reducing power consumption.
[0048] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0049] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0050] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0051] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0052] Alternatively, if the integrated units of the present invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
Claims
1. A method for controlling a laptop keyboard based on an LCD touchscreen, characterized in that, include: The system scans the touch area in real time to obtain touch signals, acquires the original coordinate signals of the user's touch based on the touch signals, and outputs valid coordinates after filtering and calibration. Acquire keyboard layout data, analyze the keyboard area, compare the effective coordinates with the key area, and determine the touched key and its state, including single click, long press, or key combination. Based on the key and status query key value mapping table, generate the corresponding keyboard scan code and send the keyboard scan code to the laptop host; The highlighted areas of the keyboard keys are obtained by generating matching vibration frequencies based on the keyboard scan codes. Load the target keyboard layout data based on the highlighted areas of the keyboard keys and update the displayed content.
2. The laptop keyboard control method based on an LCD touchscreen according to claim 1, characterized in that, The touch area is scanned in real time to obtain touch signals. Based on the touch signals, the original coordinate signals of the user's touch are obtained. After filtering and calibration, the valid coordinates are output, specifically including: The original coordinate signal is acquired, and the abnormal coordinates caused by environmental noise and touch jitter are eliminated based on the Kalman filter algorithm to obtain the factory calibration result; A mapping relationship between physical coordinates and screen pixel coordinates is established based on preset calibration points; The coordinate deviation of the calibration point displayed when the screen is clicked is analyzed based on the mapping relationship between physical coordinates and screen pixel coordinates. The physical coordinates are corrected based on the coordinate deviation to obtain the user calibration result; Output valid coordinates based on factory calibration results and user calibration results.
3. The laptop keyboard control method based on an LCD touchscreen according to claim 2, characterized in that, Acquire keyboard layout data, analyze the keyboard area, compare the valid coordinates with the key area, and determine the touched key and its state. Specifically, this includes: Acquire keyboard layout data, and analyze the unique identifier information of the keys, the boundary coordinate parameters of the keys in the screen coordinate system, and the functional attributes of the keys based on the keyboard layout data; The keyboard display area is divided into multiple independent key areas based on the boundary coordinate parameters. A key area index table is established, which records the mapping relationship between the spatial location range of each key area and the unique identifier of the corresponding key. Obtain valid coordinates, compare the valid coordinates with each key area, and determine the target key area to which the valid coordinates belong and the corresponding unique key identifier information; Obtain the touch duration, position change, and multi-touch point association of the button; The operation state of the buttons is analyzed based on the duration of touch, position changes, and the relationship between multiple touch points to obtain the touched buttons and their states.
4. The laptop keyboard control method based on an LCD touchscreen according to claim 3, characterized in that, Based on the key and status query key value mapping table, a corresponding keyboard scan code is generated and sent to the laptop host. Specifically, this includes: Construct a status query key-value mapping table, obtain key feature data, and extract static and dynamic features. The static features include: unique key identifier, current layout identifier, and attribute keys. The attribute keys include ordinary keys, modifier keys, and function keys. The dynamic features include operation state parameters, which include duration, movement trajectory, and multi-key correlation. Based on static features, the basic key value is extracted from the primary key value index. Based on dynamic features, the state transition matrix is queried, and the corresponding transition function is called to process the basic key value. Based on the state query key-value mapping table analysis, a keyboard scan code is generated from the basic key values.
5. The laptop keyboard control method based on an LCD touchscreen according to claim 4, characterized in that, Based on the keyboard scan code, a matching vibration frequency is generated to obtain the highlighted areas of the keyboard keys, specifically including: Establish a mapping relationship between scan codes and feedback parameters to obtain a correspondence table between scan code type and vibration frequency and the coordinate rules of the key area corresponding to the scan code; The screen pixel coordinate range corresponding to different key values is defined based on the correspondence table between scan code type and vibration frequency and the coordinate rules of the key area corresponding to the scan code. Obtain the generated keyboard scan code and the unique identifier of the corresponding key, and parse the keyboard scan code type; The fundamental vibration frequency is determined by querying the mapping relationship based on the scan code type. The real-time vibration frequency of the key is generated based on the key operation state. The real-time vibration frequency is compared with the basic vibration frequency to obtain the highlighted area of the keyboard key.
6. The laptop keyboard control method based on an LCD touchscreen according to claim 5, characterized in that, Load the target keyboard layout data based on the highlighted areas of the keyboard keys and update the displayed content, specifically including: The target key is obtained by analyzing the highlighted areas of the keyboard keys. Acquire relevant data about the target key and analyze its specific position and identifier in the keyboard layout; Based on the specific location and label of the target key, the corresponding target layout data is read from the pre-stored keyboard layout data; Apply the target layout data to the display interface.
7. A laptop keyboard control system based on an LCD touchscreen, characterized in that, The system includes: a memory and a processor, wherein the memory includes a program for a laptop keyboard control method based on an LCD touchscreen, and the program for the laptop keyboard control method based on an LCD touchscreen, when executed by the processor, performs the following steps: The system scans the touch area in real time to obtain touch signals, acquires the original coordinate signals of the user's touch based on the touch signals, and outputs valid coordinates after filtering and calibration. Acquire keyboard layout data, analyze the keyboard area, compare the effective coordinates with the key area, and determine the touched key and its state, including single click, long press, or key combination. Based on the key and status query key value mapping table, generate the corresponding keyboard scan code and send the keyboard scan code to the laptop host; The highlighted areas of the keyboard keys are obtained by generating matching vibration frequencies based on the keyboard scan codes. Load the target keyboard layout data based on the highlighted areas of the keyboard keys and update the displayed content.
8. The laptop keyboard control system based on an LCD touchscreen according to claim 7, characterized in that, The touch area is scanned in real time to obtain touch signals. Based on the touch signals, the original coordinate signals of the user's touch are obtained. After filtering and calibration, the valid coordinates are output, specifically including: The original coordinate signal is acquired, and the abnormal coordinates caused by environmental noise and touch jitter are eliminated based on the Kalman filter algorithm to obtain the factory calibration result; A mapping relationship between physical coordinates and screen pixel coordinates is established based on preset calibration points; The coordinate deviation of the calibration point displayed when the screen is clicked is analyzed based on the mapping relationship between physical coordinates and screen pixel coordinates. The physical coordinates are corrected based on the coordinate deviation to obtain the user calibration result; Output valid coordinates based on factory calibration results and user calibration results.
9. The laptop keyboard control system based on an LCD touchscreen according to claim 8, characterized in that, Acquire keyboard layout data, analyze the keyboard area, compare the valid coordinates with the key area, and determine the touched key and its state. Specifically, this includes: Acquire keyboard layout data, and analyze the unique identifier information of the keys, the boundary coordinate parameters of the keys in the screen coordinate system, and the functional attributes of the keys based on the keyboard layout data; The keyboard display area is divided into multiple independent key areas based on the boundary coordinate parameters. A key area index table is established, which records the mapping relationship between the spatial location range of each key area and the unique identifier of the corresponding key. Obtain valid coordinates, compare the valid coordinates with each key area, and determine the target key area to which the valid coordinates belong and the corresponding unique key identifier information; Obtain the touch duration, position change, and multi-touch point association of the button; The operation state of the buttons is analyzed based on the duration of touch, position changes, and the relationship between multiple touch points to obtain the touched buttons and their states.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a laptop keyboard control method program based on an LCD touchscreen, which, when executed by a processor, implements the steps of the laptop keyboard control method based on an LCD touchscreen as described in any one of claims 1 to 6.