Six-key non-punching and full-key non-punching automatic switching method

CN118779271APending Publication Date: 2024-10-15HEFEI MADAO INFORMATION TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410880123.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

[0004]本发明的目的在于提供一种六键无冲和全键无冲自动切换方法,用于解决现有技术中全键无冲兼容性使用效果差的问题

Benefits of technology

[0025]本发明的有益效果:本申请的六键无冲和全键无冲自动切换方法中,外部主机的设备管理器通过两个H ID键盘端点与键盘设备建立USB输入连接,当前变动的按键数据报文优先以预设标准六键无冲数据格式输出至外部主机,当已按下的按键个数超过规定值,规定值以外的按键数据报文以对应的预设全键无冲数据格式输出至外部主机。也即说键盘设备能够根据按键的数据通过不同的按键描述报文格式发送键盘数据给外部主机,有效的解决了B I SO下标准键盘数据格式的兼容性问题,同时在不支持全键无冲协议的系统上使用该键盘,也可以确保键盘正常使用。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779271A_ABST
    Figure CN118779271A_ABST
Patent Text Reader

Abstract

The invention discloses a six-key no-punching and full-key no-punching automatic switching method, which comprises the following steps of: judging whether the number of pressed keys is less than six specified values according to matrix key state information, if so, outputting a currently changed key data message to an external host in a corresponding preset standard six-key no-punching data format, and if not, outputting the currently changed key data message to the external host in the preset standard six-key no-punching data format. The key data messages with the specified values smaller than six in the current changing key data messages are still output to the external host in the corresponding preset standard six-key no-impact data format, and the key data messages exceeding the specified values are output to the external host in the corresponding preset full-key no-impact data format. According to the six-key no-impact and full-key no-impact automatic switching method, the compatibility problem of standard keyboard data formats under BISO is effectively solved, and meanwhile, normal use of the keyboard can also be ensured when the keyboard is used on a system which does not support a full-key no-impact protocol.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of keyboard equipment, and in particular to a method for automatically switching between six-key anti-ghosting and full-key anti-ghosting. Background Art

[0002] The keyboard device is the basic input device of the computer. A conventional keyboard device generally consists of 104 keys. As an important part of the user experience, it is necessary to ensure that enough keys are pressed simultaneously while ensuring that the computer can normally recognize the key input.

[0003] The data format of a standard keyboard is six keys and eight bytes, which means that at most six keys can be pressed at the same time. The computer can ensure that key input is recognized normally, so that the standard keyboard device only supports six-key anti-ghosting. In actual applications, six-key anti-ghosting input cannot meet the input requirements of more than six keys. In the prior art, the input requirements of more than one number of keys are met by replacing the keyboard device. The replaced keyboard device supports full-key anti-ghosting, but full-key anti-ghosting is not suitable for compatible use with all keyboard device systems. For example, a full-key anti-ghosting keyboard has usage difficulties on the basic input and output system (BISO) of some computers. Summary of the invention

[0004] The purpose of the present invention is to provide a method for automatically switching between six-key anti-ghosting and full-key anti-ghosting, so as to solve the problem of poor compatibility of full-key anti-ghosting in the prior art.

[0005] The purpose of the present invention can be achieved through the following technical solutions:

[0006] A method for automatically switching between six-key anti-ghosting and full-key anti-ghosting, comprising the following steps:

[0007] The keyboard device is enumerated, and a preset standard six-key anti-ghosting description table and a full-key anti-ghosting description table are sent to an external host, and a device manager of the external host establishes a USB input connection with the keyboard device through two HID keyboard endpoints;

[0008] Scan the matrix key status of the keyboard device to obtain current matrix key status information;

[0009] According to the matrix key status information, determine whether the number of pressed keys is less than the specified value of six. If so, output the currently changed key data message to the external host in the corresponding preset standard six-key non-conflict data format. Otherwise, the key data message with a specified value of less than six in the currently changed key data message is still output to the external host in the corresponding preset standard six-key non-conflict data format, and the key data message exceeding the specified value is output to the external host in the corresponding preset full-key non-conflict data format.

[0010] As a further solution of the present invention: a method for determining whether the number of pressed keys is less than a specified value of six comprises: determining, based on the matrix key state information, whether the report segment value of the current key change is 1 or 0;

[0011] Among them, if the report segment value of the current key change is 1, it means that the current key is in a pressed state, and it is judged whether the number of keys pressed is less than the specified value of six; if the report segment value of the current key change is 0, it means that the current key is in a pop-up state, and it is judged whether the number of keys still pressed after the pop-up key is less than the specified value of six.

[0012] As a further solution of the present invention, the method of outputting the key data messages with less than six specified values ​​in the currently changed key data messages to the external host in the corresponding preset standard six-key non-collision data format, and outputting the key data messages exceeding the specified value to the external host in the corresponding preset full-key non-collision data format comprises the following steps:

[0013] S1, the external host obtains the last six-key anti-collision data message and the full-key anti-collision data message, and obtains the current matrix key state information;

[0014] S2, directly assigning the first byte data in the current matrix key state information to the current six-key non-collision data message;

[0015] S3, the keyboard device key positions are traversed and scanned. If the report segment value of the current key change is 0, the next key position is traversed. If the report segment value of the current key change is 1, step S4 is executed.

[0016] S4, determine whether the last six-key non-conflict data message includes the current key, if so, copy the key value corresponding to the current key to the current six-key non-conflict message, and execute step S7, otherwise, execute step S5;

[0017] S5, determine whether the last full-key no-conflict data message includes the current key, if so, copy the key value corresponding to the current key to the current full-key no-conflict data message, and execute step S7, otherwise, execute step S6;

[0018] S6, judging whether there is an empty key storage area in the current six-key non-conflict message, if so, copying the key value corresponding to the current key to the current six-key non-conflict message, otherwise, copying the key value corresponding to the current key to the current full-key non-conflict data message;

[0019] S7, determining whether the traversed key position of the keyboard device is the last key position, if so, executing step S8, otherwise, returning to step S3;

[0020] S8, judging whether the last six-key no-conflict data message is consistent with the current six-key no-conflict data message, if not, transmitting the current six-key no-conflict data message to the external host in the six-key eight-byte format, and storing the current six-key no-conflict data message overwriting the last six-key no-conflict data message;

[0021] S9. Determine whether the last full-key conflict-free data message is consistent with the current full-key conflict-free data message. If not, output the current full-key conflict-free data message to the external host in the corresponding full-key conflict-free data format, and store the current full-key conflict-free data message over the last full-key conflict-free data message.

[0022] As a further solution of the present invention: the current matrix key status information includes a 14-byte key output format, wherein 1 byte is a control key, and the control key is output to an external host in a preset standard six-key conflict-free data format, and the remaining 13 bytes are ordinary keys.

[0023] As a further solution of the present invention: the preset standard six-key non-conflict data format is a six-key eight-byte key data format.

[0024] As a further solution of the present invention: the preset full-key conflict-free data format is a key data format of more than thirteen bytes.

[0025] Beneficial effects of the present invention: In the automatic switching method between six-key anti-collision and full-key anti-collision of the present application, the device manager of the external host establishes a USB input connection with the keyboard device through two HID keyboard endpoints, and the currently changed key data message is preferentially output to the external host in the preset standard six-key anti-collision data format. When the number of keys pressed exceeds the specified value, the key data message outside the specified value is output to the external host in the corresponding preset full-key anti-collision data format. In other words, the keyboard device can send keyboard data to the external host through different key description message formats according to the key data, which effectively solves the compatibility problem of the standard keyboard data format under BISO. At the same time, when the keyboard is used on a system that does not support the full-key anti-collision protocol, the normal use of the keyboard can also be ensured. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The present invention will be further described below in conjunction with the accompanying drawings.

[0027] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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.

[0029] In the description of the present invention, it should be understood that the terms indicating orientation or positional relationship are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention; in the description of the present invention, the meaning of "multiple" and "several" is at least two, for example two, three, etc., unless otherwise clearly and specifically defined.

[0030] See also Figure 1 As shown, the present invention is a method for automatically switching between six-key anti-collision and full-key anti-collision, comprising the following steps:

[0031] The keyboard device is enumerated, and a preset standard six-key anti-ghosting description table and a full-key anti-ghosting description table are sent to the external host. The device manager of the external host establishes a USB input connection with the keyboard device through two HID keyboard endpoints.

[0032] Scan the matrix key status of the keyboard device to obtain the current matrix key status information.

[0033] According to the matrix key status information, determine whether the number of pressed keys is less than the specified value of six. If so, output the currently changed key data message to the external host in the corresponding preset standard six-key non-conflict data format. Otherwise, the key data message with a specified value of less than six in the currently changed key data message is still output to the external host in the corresponding preset standard six-key non-conflict data format, and the key data message exceeding the specified value is output to the external host in the corresponding preset full-key non-conflict data format.

[0034] The method for determining whether the number of keys pressed is less than or equal to six, a specified value, includes: determining whether the report segment value of the current key change is 1 or 0 based on the matrix key status information; wherein, if the report segment value of the current key change is 1, it indicates that the current key is in a pressed state, and it is determined whether the number of keys pressed is less than or equal to six, a specified value; if the report segment value of the current key change is 0, it indicates that the current key is in a pop-up state, and it is determined whether the number of keys still pressed after the pop-up key is less than or equal to six, a specified value.

[0035] In the automatic switching method between six-key anti-ghosting and full-key anti-ghosting of the present application, the device manager of the external host establishes a USB input connection with the keyboard device through two HID keyboard endpoints, and the currently changed key data message is preferentially output to the external host in the preset standard six-key anti-ghosting data format, and when the number of keys pressed exceeds the specified value, the key data message outside the specified value is output to the external host in the corresponding preset full-key anti-ghosting data format. In other words, the keyboard device can send keyboard data to the external host through different key description message formats according to the key data, which effectively solves the compatibility problem of the standard keyboard data format under BISO, and at the same time, when the keyboard is used on a system that does not support the full-key anti-ghosting protocol, it can also ensure the normal use of the keyboard.

[0036] Since the traditional standard keyboard data format for the current computer basic input and output system BISO is six keys and eight bytes, that is, at most six keys can be pressed simultaneously, the computer can ensure normal recognition of key input.

[0037] In this specific implementation, the preset standard six-key non-collision data format is a six-key eight-byte key data format. Among them, the first byte represents a control key, which is fixed and can be CTRL (L), SHIFT (L), ALT (L), GU I (L), CTRL (R), SHIFT (R), ALT (R) or GU I (R). The second byte is a reserved byte, which defaults to 0, and the remaining six bytes are ordinary keys. As shown in the following Table 1, Byte1 to Byte8 represent the first byte to the eighth byte respectively.

[0038] Table 1 Report format for standard six-key anti-ghosting keyboard

[0039]

[0040] In this specific implementation, the correspondence between common keys and key values ​​in the keyboard device is shown in Table 2.

[0041] Table 2 Correspondence between common keys and key values ​​of standard six-key anti-ghosting keyboard

[0042]

[0043]

[0044] In this specific implementation, the full-key non-overlapping data format is preset to a key data format of more than thirteen bytes, so that the total length of the full-key non-overlapping message can be 13 bytes, each bit of which represents a key, which is the same as the six-key non-overlapping control key format, that is, a total of 104 keys can be represented by being pressed simultaneously, and the 104 keys can include all the keys in Table 2.

[0045] Among them, the report descriptor of the full-key non-conflict message is as follows:

[0046]

[0047]

[0048] It should be understood that the report description format of the full-key no-collision message is a unified standard of H ID, which will not be elaborated here. It can be seen from the above report descriptor that the number of full-key no-collision message report segments is 104 (0x68), and each report segment is 1 bit long. Its logical maximum value and logical minimum value represent the maximum value and minimum value that each report segment can express. Because each report segment is 1 bit long, its maximum value and minimum value can only be 1 and 0. The maximum value and minimum value of the use are the maximum value and minimum value of the key value used by the entire message. The key value expressed by each report segment is incremented in sequence. If the key value expressed by the first report segment is 0, it has no corresponding key value, then the report segment is invalid (because the key value 0x00-0x03 of H ID is invalid data, even if it is included in the message, it does not matter, the USB host will automatically discard the invalid data), the key value expressed by the fifth report segment is 0x04, which is key A, and if the value of the report segment is 1, it means that key A is pressed.

[0049] Combination Figure 1 As shown, the method of outputting the key data message with less than six specified values ​​in the currently changed key data message to the external host in the corresponding preset standard six-key non-collision data format, and outputting the key data message exceeding the specified value to the external host in the corresponding preset full-key non-collision data format includes the following steps:

[0050] S1. The external host obtains the last six-key anti-collision data message and the full-key anti-collision data message, and obtains the current matrix key state information.

[0051] S2. directly assign the first byte of data in the current matrix key state information to the current six-key conflict-free data message.

[0052] S3. The keyboard device performs a traversal scan of the key positions. If the report segment value of the current key change is 0, the traversal scan continues to the next key position. If the report segment value of the current key change is 1, step S4 is executed.

[0053] S4, determine whether the last six-key no-conflict data message includes the current key. If so, copy the key value corresponding to the current key to the current six-key no-conflict message and execute step S7. Otherwise, execute step S5.

[0054] S5. Determine whether the last full-key no-conflict data message includes the current key. If so, copy the key value corresponding to the current key to the current full-key no-conflict data message and execute step S7. Otherwise, execute step S6.

[0055] S6. Determine whether there is an empty key storage area in the current six-key non-conflict message. If so, copy the key value corresponding to the current key to the current six-key non-conflict message. Otherwise, copy the key value corresponding to the current key to the current full-key non-conflict data message.

[0056] S7, determine whether the traversed key position of the keyboard device is the last key position, if so, execute step S8, otherwise, return to step S3.

[0057] S8. Determine whether the last six-key no-conflict data message is consistent with the current six-key no-conflict data message. If not, transmit the current six-key no-conflict data message to the external host in a six-key eight-byte format, and store the current six-key no-conflict data message over the last six-key no-conflict data message.

[0058] S9. Determine whether the last full-key conflict-free data message is consistent with the current full-key conflict-free data message. If not, output the current full-key conflict-free data message to the external host in the corresponding full-key conflict-free data format, and store the current full-key conflict-free data message over the last full-key conflict-free data message.

[0059] The current matrix key status information includes a 14-byte key output format, of which 1 byte is a control key, which is output to an external host in a preset standard six-key conflict-free data format, and the remaining 13 bytes are ordinary keys; the 13-byte key data format is the same as the full-key conflict-free format, and whether it is sent through a six-key conflict-free message or a full-key conflict-free message is determined by the specific implementation steps of the method of outputting the key data message with less than six specified values ​​in the currently changed key data message to the external host in the corresponding preset standard six-key conflict-free data format, and outputting the key data message exceeding the specified value to the external host in the corresponding preset full-key conflict-free data format.

[0060] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. A method for automatically switching between six-key anti-ghosting and full-key anti-ghosting, characterized in that: The following steps are involved: The keyboard device is enumerated, and a preset standard six-key anti-ghosting description table and a full-key anti-ghosting description table are sent to an external host, and a device manager of the external host establishes a USB input connection with the keyboard device through two HID keyboard endpoints; Scan the matrix key status of the keyboard device to obtain current matrix key status information; According to the matrix key status information, determine whether the number of pressed keys is less than the specified value of six. If so, output the currently changed key data message to the external host in the corresponding preset standard six-key non-conflict data format. Otherwise, the key data message with a specified value of less than six in the currently changed key data message is still output to the external host in the corresponding preset standard six-key non-conflict data format, and the key data message exceeding the specified value is output to the external host in the corresponding preset full-key non-conflict data format.

2. The method for automatically switching between six-key anti-collision and full-key anti-collision according to claim 1, characterized in that: The method for determining whether the number of pressed keys is less than a specified value of six comprises: determining, based on the matrix key state information, whether the report segment value of the current key change is 1 or 0; Among them, if the report segment value of the current key change is 1, it means that the current key is in a pressed state, and it is judged whether the number of keys pressed is less than the specified value of six; if the report segment value of the current key change is 0, it means that the current key is in a pop-up state, and it is judged whether the number of keys still pressed after the pop-up key is less than the specified value of six.

3. The method for automatically switching between six-key anti-collision and full-key anti-collision according to claim 2, characterized in that: The method of outputting the key data messages with less than six specified values ​​in the currently changed key data messages to the external host in the corresponding preset standard six-key non-collision data format, and outputting the key data messages exceeding the specified value to the external host in the corresponding preset full-key non-collision data format comprises the following steps: S1, the external host obtains the last six-key anti-collision data message and the full-key anti-collision data message, and obtains the current matrix key state information; S2, directly assigning the first byte data in the current matrix key state information to the current six-key non-collision data message; S3, the keyboard device key positions are traversed and scanned. If the report segment value of the current key change is 0, the next key position is traversed. If the report segment value of the current key change is 1, step S4 is executed. S4, determine whether the last six-key non-conflict data message includes the current key, if so, copy the key value corresponding to the current key to the current six-key non-conflict message, and execute step S7, otherwise, execute step S5; S5, determine whether the last full-key no-conflict data message includes the current key, if so, copy the key value corresponding to the current key to the current full-key no-conflict data message, and execute step S7, otherwise, execute step S6; S6, judging whether there is an empty key storage area in the current six-key non-conflict message, if so, copying the key value corresponding to the current key to the current six-key non-conflict message, otherwise, copying the key value corresponding to the current key to the current full-key non-conflict data message; S7, determining whether the traversed key position of the keyboard device is the last key position, if so, executing step S8, otherwise, returning to step S3; S8, judging whether the last six-key no-conflict data message is consistent with the current six-key no-conflict data message, if not, transmitting the current six-key no-conflict data message to the external host in the six-key eight-byte format, and storing the current six-key no-conflict data message overwriting the last six-key no-conflict data message; S9. Determine whether the last full-key conflict-free data message is consistent with the current full-key conflict-free data message. If not, output the current full-key conflict-free data message to the external host in the corresponding full-key conflict-free data format, and store the current full-key conflict-free data message over the last full-key conflict-free data message.

4. The method for automatically switching between six-key anti-collision and full-key anti-collision according to claim 1, characterized in that: The current matrix key state information includes a 14-byte key output format, wherein 1 byte is a control key, and the control key is output to an external host in a preset standard six-key conflict-free data format, and the remaining 13 bytes are ordinary keys.

5. The method for automatically switching between six-key anti-ghosting and full-key anti-ghosting according to claim 1, characterized in that: The preset standard six-key non-collision data format is a six-key eight-byte key data format.

6. The method for automatically switching between six-key anti-ghosting and full-key anti-ghosting according to claim 1, characterized in that: The preset full-key non-collision data format is a key data format of more than thirteen bytes.

Citation Information

Patent Citations

  • System and method for achieving full key non-conflict for keyboard

    CN103092358A

  • Adaptive button touch detection system and method

    CN109495100A

  • Bluetooth full-key conflict-free keyboard and working method thereof

    CN112181168A

  • Keyboard device, full-key conflict-free triggering method thereof and computer storage medium

    CN114637410A

  • Bluetooth full-key conflict-free keyboard

    CN213690546U