CN108089722A - A kind of key assignments customizing keyboard configures system and method - Google Patents
A kind of key assignments customizing keyboard configures system and method Download PDFInfo
- Publication number
- CN108089722A CN108089722A CN201711335298.1A CN201711335298A CN108089722A CN 108089722 A CN108089722 A CN 108089722A CN 201711335298 A CN201711335298 A CN 201711335298A CN 108089722 A CN108089722 A CN 108089722A
- Authority
- CN
- China
- Prior art keywords
- key
- keyboard
- key assignments
- configuration
- host computer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/023—Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
- G06F3/0238—Programmable keyboards
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/0202—Constructional details or processes of manufacture of the input device
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Input From Keyboards Or The Like (AREA)
Abstract
本发明提供的键值自定义键盘配置系统,包括上位机配置单元、自定义键盘及通讯线,上位机配置单元用于为自定义键盘的每一个单键或组合键进行编码,所述自定义键盘包括多个按键、中央处理器、配置下载数据口,中央处理器对多个按键进行扫描获得每个按键的按键扫描码,当检测到有按键被按下时扫描到指定按键后进行按键编码,根据接收到的应用配置对相应指定按键按照键盘扫描码进行键值编码,编码后通过通讯线向上位机配置单元发送编码数据,直至所有按键对应的键值设定完成后上位机配置单元通过配置下载数据口将通过键值判别正确的键值配置信息导入到中央处理器以完成配置,利用该键盘输入所自定义的键值,满足用户对键盘键值的不同需求。
The key value custom keyboard configuration system provided by the present invention includes a host computer configuration unit, a custom keyboard and a communication line, and the host computer configuration unit is used to encode each single key or combined key of the custom keyboard, and the custom The keyboard includes multiple keys, a central processing unit, and a configuration download data port. The central processing unit scans multiple keys to obtain the key scanning code of each key. When a key is detected to be pressed, it scans the specified key and performs key coding. According to the received application configuration, the corresponding specified keys are coded according to the keyboard scan code. After encoding, the encoded data is sent to the host computer configuration unit through the communication line until the key values corresponding to all keys are set. After the host computer configuration unit passes The configuration download data port will import the correct key value configuration information through the key value judgment to the central processing unit to complete the configuration, and use the keyboard to input the customized key value to meet the different needs of the user for the keyboard key value.
Description
技术领域technical field
本发明涉及电子设备领域,特别涉及一种键值自定义键盘配置系统及方法。The invention relates to the field of electronic equipment, in particular to a key value custom keyboard configuration system and method.
背景技术Background technique
现代生活中,随着集成电路技术的不断发展,已经出现了各种各样的电子设备,在这些众多的电子设备(如掌上电脑、智能手机、嵌入式系统、袖珍型电脑等)上,由于受到体积,制造成本等因素的制约,无法配备全尺寸的硬件键盘,因而在这类设备上进行输入通常是充满挑战的。In modern life, with the continuous development of integrated circuit technology, various electronic devices have appeared. On these numerous electronic devices (such as handheld computers, smart phones, embedded systems, pocket computers, etc.), due to Restricted by factors such as size and manufacturing cost, a full-size hardware keyboard cannot be equipped, so inputting on such devices is usually full of challenges.
在仪器仪表人机交互单元的开发过程中,其主控单元常常采用PC104等安装有操作系统的工控主板,用其实现对液晶屏和键盘的驱动。专用仪器仪表根据用户操作的需要其按键通常需要特殊定制,其尺寸、按键数量以及按键的键值码都和普通的USB键盘有所不同,尤其是在按键的键值上,若只包含标准键盘的键值,远远不能满足用户的需求,如按一个键连续打一串固定的数字、组合快捷键等等。因此,研制出一种具有键值自定义功能USB键盘,对于提高仪器仪表用户操作键的开发速度和用户体验具有很强现实意义。In the development process of the human-computer interaction unit of the instrument, its main control unit often adopts an industrial control motherboard installed with an operating system such as PC104, and uses it to drive the LCD screen and keyboard. The keys of special instruments and meters usually need to be specially customized according to the needs of user operations. The key value is far from meeting the needs of users, such as pressing a key to continuously type a string of fixed numbers, combining shortcut keys, and so on. Therefore, developing a USB keyboard with a key value customization function has very strong practical significance for improving the development speed and user experience of instrumentation user operation keys.
发明内容Contents of the invention
本发明实施例提供了一种键值自定义键盘配置系统及方法,可利用该键盘输入所定义的标准键值或组合键,满足不同用户对键盘键值的不同需求。The embodiment of the present invention provides a key value custom keyboard configuration system and method, which can use the keyboard to input defined standard key values or combination keys to meet different needs of different users for keyboard key values.
第一方面,本发明实施例中提供的键值自定义键盘配置系统,包括上位机配置单元、自定义键盘及通讯线,所述上位机配置单元用于为所述自定义键盘的每一个单键或组合键进行编码,所述通讯线用于连接所述上位机配置单元和所述自定义键盘,所述自定义键盘包括多个按键、中央处理器、配置下载数据口,所述中央处理器分别与所述按键及所述配置下载数据口电连接,所述中央处理器对所述多个按键进行扫描获得每个按键的按键扫描码,当检测到有按键被按下时扫描到指定按键后进行按键编码,根据接收到的应用配置对相应所述指定按键按照键盘扫描码进行键值编码,编码后通过所述通讯线向所述上位机配置单元发送编码数据,直至所有按键对应的键值设定完成后所述上位机配置单元通过配置下载数据口将通过键值判别正确的键值配置信息导入到所述中央处理器以完成配置。In the first aspect, the key-value custom keyboard configuration system provided in the embodiment of the present invention includes a host computer configuration unit, a custom keyboard and a communication line, and the host computer configuration unit is used for each unit of the custom keyboard. key or key combination for encoding, the communication line is used to connect the host computer configuration unit and the custom keyboard, the custom keyboard includes a plurality of keys, a central processing unit, a configuration download data port, the central processing The device is electrically connected to the buttons and the configuration download data port respectively, the central processing unit scans the multiple buttons to obtain the button scan code of each button, and scans to the specified button when it detects that a button is pressed. After the key is pressed, the key is coded, and the corresponding specified key is coded according to the keyboard scan code according to the received application configuration. After coding, the coded data is sent to the upper computer configuration unit through the communication line until all the keys correspond to After the key value setting is completed, the configuration unit of the host computer imports the correct key value configuration information determined by the key value into the central processing unit through the configuration download data port to complete the configuration.
可选地,所述自定义键盘还包括缓冲器,所述缓冲器与所述中央处理器电连接。Optionally, the custom keyboard further includes a buffer, and the buffer is electrically connected to the central processing unit.
可选地,所述通讯线为USB通信线,所述自定义键盘还包括用于实现PS2数据转USB数据的接口转换芯片,所述接口转换芯片分别与所述通讯线和所述缓冲器电连接。Optionally, the communication line is a USB communication line, and the custom keyboard also includes an interface conversion chip for converting PS2 data to USB data, and the interface conversion chip is connected to the communication line and the buffer circuit respectively. connect.
可选地,所述中央处理器具有EEPROM存储器,所述键值配置信息存储在所述EEPROM存储器中。Optionally, the central processing unit has an EEPROM memory, and the key value configuration information is stored in the EEPROM memory.
可选地,所述中央处理器采用PIC单片机PIC16F886处理器,所述接口转换芯片为CSC0101A芯片。Optionally, the central processing unit adopts a PIC single-chip microcomputer PIC16F886 processor, and the interface conversion chip is a CSC0101A chip.
第二方面,本发明实施例中提供的键值自定义键盘配置方法,所述方法包括:In the second aspect, the key-value custom keyboard configuration method provided in the embodiment of the present invention, the method includes:
中央处理器上电后进行程序初始化;After the central processing unit is powered on, the program is initialized;
当没有收到上位机配置单元的计算机指令则进行按键扫描,确定是否有按键按下;When the computer command from the configuration unit of the upper computer is not received, the key scanning is performed to determine whether a key is pressed;
当扫描到所述按键后进行按键编码,根据用户的应用配置对相应指定按键按照键盘扫描码进行键值编码;After the key is scanned, the key is coded, and the corresponding specified key is coded according to the keyboard scan code according to the user's application configuration;
编码后通过所述通讯线向所述上位机配置单元发送编码数据;After encoding, send the encoded data to the host computer configuration unit through the communication line;
所述上位机配置单元判断所有按键对应的码值设定完成后判别键值是否正确;The host computer configuration unit judges whether the key values are correct after the code values corresponding to all keys are set;
所述上位机配置单元通过配置下载数据口将通过键值判别正确的键值配置信息导入到所述中央处理器以完成配置。The configuration unit of the upper computer imports the correct key value configuration information through the key value discrimination to the central processing unit through the configuration download data port to complete the configuration.
可选地,所述根据用户的应用配置对相应指定按键按照键盘扫描码进行键值编码,包括:Optionally, performing key-value coding on the corresponding specified key according to the keyboard scan code according to the user's application configuration includes:
所述根据用户的应用配置对相应指定按键按照键盘扫描码以预定码值发送顺序将码值进行发送。According to the user's application configuration, the code value is sent to the corresponding specified key according to the keyboard scan code in a predetermined code value sending sequence.
可选地,所述预定码值发送顺序,包括:Optionally, the sending order of the predetermined code value includes:
若为标准键值则直接进行通码加断码的编码;或If it is a standard key value, directly encode the pass code plus the break code; or
若为功能组合键则分别按顺序发组合通码,再按相反的顺序发组合断码;或If it is a function combination key, send the combined pass code in sequence, and then send the combined break code in the reverse order; or
若为数据组合键则按照数据编码的顺序连续发送对应数据的通码、断码实现数据组合。If it is a data combination key, the pass code and break code of the corresponding data are sent continuously according to the sequence of data encoding to realize data combination.
可选地,所述编码后通过所述通讯线向所述上位机配置单元发送编码数据之前,还包括:Optionally, before sending the encoded data to the host computer configuration unit through the communication line after the encoding, it also includes:
判断所述上位机配置单元是否允许发送,若允许则执行后续步骤。It is judged whether the configuration unit of the upper computer is allowed to send, and if it is allowed, the subsequent steps are performed.
可选地,所述上位机配置单元判断所有按键对应的码值设定完成后判别键值是否正确,包括:Optionally, the host computer configuration unit judges whether the key values are correct after the code values corresponding to all keys are set, including:
所述上位机配置单元判断所有按键对应的码值设定完成后判别每个键值的设定通码和断码是否成对出现,若是则键值判别正确。After the host computer configuration unit judges that the code values corresponding to all keys are set, it judges whether the setting pass code and break code of each key value appear in pairs, and if so, the key value judgment is correct.
从以上技术方案可以看出,本发明实施例具有以下优点:It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:
本发明实施例中提供的键值自定义键盘配置系统,包括上位机配置单元、自定义键盘及通讯线,所述上位机配置单元用于为所述自定义键盘的每一个单键或组合键进行编码,所述通讯线用于连接所述上位机配置单元和所述自定义键盘,所述自定义键盘包括多个按键、中央处理器、配置下载数据口,所述中央处理器分别与所述按键及所述配置下载数据口电连接,所述中央处理器对所述多个按键进行扫描获得每个按键的按键扫描码,当检测到有按键被按下时扫描到指定按键后进行按键编码,根据接收到的应用配置对相应所述指定按键按照键盘扫描码进行键值编码,编码后通过所述通讯线向所述上位机配置单元发送编码数据,直至所有按键对应的键值设定完成后所述上位机配置单元通过配置下载数据口将通过键值判别正确的键值配置信息导入到所述中央处理器以完成配置,可利用该键盘输入所定义的标准键值或组合键,满足不同用户对键盘键值的不同需求。The key value custom keyboard configuration system provided in the embodiment of the present invention includes a host computer configuration unit, a custom keyboard and a communication line, and the host computer configuration unit is used for each single key or combination key of the custom keyboard Encoding, the communication line is used to connect the host computer configuration unit and the custom keyboard, the custom keyboard includes a plurality of buttons, a central processing unit, a configuration download data port, the central processing unit is connected to the The buttons and the configuration download data port are electrically connected, and the central processing unit scans the plurality of buttons to obtain the button scan code of each button. When it is detected that a button is pressed, the designated button is scanned and the button is pressed. Coding, according to the received application configuration, perform key value coding on the corresponding specified keys according to the keyboard scan code, after coding, send the encoded data to the configuration unit of the host computer through the communication line, until the key values corresponding to all keys are set After completion, the upper computer configuration unit will import the correct key value configuration information through the key value discrimination to the central processing unit to complete the configuration through the configuration download data port, and the keyboard can be used to input the defined standard key value or key combination, To meet the different needs of different users for keyboard key values.
附图说明Description of drawings
图1是本发明实施例中的键值自定义键盘配置系统的结构示意图;Fig. 1 is the structural representation of the key value self-defining keyboard configuration system in the embodiment of the present invention;
图2是本发明实施例中的键值自定义键盘配置方法的流程图。Fig. 2 is a flowchart of a method for configuring a key-value custom keyboard in an embodiment of the present invention.
附图标记:Reference signs:
按键1,中央处理器2,缓冲器3,接口转换芯片4,通讯线5,配置下载数据口6,上位机配置单元7。Button 1, central processing unit 2, buffer 3, interface conversion chip 4, communication line 5, configuration download data port 6, upper computer configuration unit 7.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is an embodiment of a part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and not necessarily Used to describe a specific sequence or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.
结合图1所示,本发明实施例中提供的键值自定义键盘配置系统,包括上位机配置单元7、自定义键盘及通讯线5,所述上位机配置单元7用于为所述自定义键盘的每一个单键或组合键进行编码,所述通讯线5用于连接所述上位机配置单元7和所述自定义键盘,所述自定义键盘包括多个按键1、中央处理器2、配置下载数据口6,按键1可以采用机械式按键,所述中央处理器2分别与所述按键1及所述配置下载数据口6电连接,所述中央处理器2对所述多个按键1进行扫描获得每个按键1的按键扫描码,当检测到有按键1被按下时扫描到指定按键后进行按键编码,根据接收到的应用配置对相应所述指定按键按照键盘扫描码进行键值编码,编码后通过所述通讯线5向所述上位机配置单元7发送编码数据,直至所有按键1对应的键值设定完成后所述上位机配置单元7通过配置下载数据口6将通过键值判别正确的键值配置信息导入到所述中央处理器2以完成配置。In conjunction with shown in Fig. 1, the key value self-defining keyboard configuration system provided in the embodiment of the present invention comprises host computer configuration unit 7, custom keyboard and communication line 5, and described host computer configuration unit 7 is used for described custom Each single key or key combination of the keyboard is coded, and the communication line 5 is used to connect the host computer configuration unit 7 and the custom keyboard, and the custom keyboard includes a plurality of buttons 1, a central processing unit 2, Configure the download data port 6, the button 1 can be a mechanical button, the central processing unit 2 is electrically connected to the button 1 and the configuration download data port 6 respectively, and the central processing unit 2 is connected to the plurality of buttons 1 Scan to obtain the key scan code of each key 1. When it is detected that the key 1 is pressed, the specified key is scanned and then the key is coded. According to the received application configuration, the key value of the corresponding specified key is calculated according to the keyboard scan code. Encoding, after encoding, send encoded data to the host computer configuration unit 7 through the communication line 5 until the key values corresponding to all keys 1 are set. The key-value configuration information whose value is judged correct is imported to the central processing unit 2 to complete the configuration.
所述自定义键盘还包括缓冲器3,所述缓冲器3与所述中央处理器2电连接,在键盘上通常有上百个按键1,每个按键1负责一个功能,当用户按下其中一个时,键盘中的编码器能够迅速将此按键1所对应的编码通过接口电路输送到缓冲器3中,由CPU进行识别处理,本领域普通技术人员应当了解,具体不作赘述。The custom keyboard also includes a buffer 3, the buffer 3 is electrically connected to the central processing unit 2, there are usually hundreds of keys 1 on the keyboard, each key 1 is responsible for a function, when the user presses one of them At one time, the coder in the keyboard can quickly transfer the code corresponding to the key 1 to the buffer 3 through the interface circuit, and the CPU will perform the identification process. Those skilled in the art should understand it, and the details will not be repeated.
可选地,所述通讯线5为USB通信线,所述自定义键盘还包括用于实现PS2数据转USB数据的接口转换芯片4,所述接口转换芯片4分别与所述通讯线5和所述缓冲器3电连接。Optionally, the communication line 5 is a USB communication line, and the custom keyboard also includes an interface conversion chip 4 for converting PS2 data to USB data, and the interface conversion chip 4 is connected to the communication line 5 and the communication line 5 respectively. The buffer 3 is electrically connected.
可选地,所述中央处理器2具有EEPROM存储器,所述键值配置信息存储在所述EEPROM存储器中,配置信息通过配置下载数据口6导入键盘中时,键盘的处理器PIC单片机会自动将键值信息存储到单片机内部的EEPROM存储器中,保证信息掉电不丢失。键盘使用时,上电后,会从EEPROM存储器指定区域调取键值信息。Optionally, the central processing unit 2 has an EEPROM memory, and the key value configuration information is stored in the EEPROM memory. When the configuration information is imported into the keyboard through the configuration download data port 6, the processor PIC microcontroller of the keyboard will automatically The key value information is stored in the EEPROM memory inside the microcontroller to ensure that the information will not be lost when the power is turned off. When the keyboard is in use, after power-on, the key value information will be retrieved from the designated area of the EEPROM memory.
可选地,所述中央处理器2采用PIC单片机PIC16F886处理器,所述接口转换芯片4为CSC0101A芯片,还可以根据需要选择其他类似芯片,对此不做限定。Optionally, the central processing unit 2 adopts a PIC single-chip microcomputer PIC16F886 processor, and the interface conversion chip 4 is a CSC0101A chip, and other similar chips can also be selected as required, which is not limited.
结合图2所示,本发明实施例中提供的键值自定义键盘配置方法,所述方法包括:Shown in conjunction with Fig. 2, the key value self-defining keyboard configuration method provided in the embodiment of the present invention, described method comprises:
S201、中央处理器上电后进行程序初始化。S201. Perform program initialization after the central processing unit is powered on.
在初始化的过程中,如果接收到计算机指令要进行回复处理。During the initialization process, if a computer instruction is received, reply processing is required.
S202、当没有收到上位机配置单元的计算机指令则进行按键扫描,确定是否有按键按下。S202. When no computer instruction from the configuration unit of the host computer is received, scan the keys to determine whether a key is pressed.
S203、当扫描到所述按键后进行按键编码,根据用户的应用配置对相应指定按键按照键盘扫描码进行键值编码。S203. Perform key coding after the key is scanned, and perform key value coding on the corresponding specified key according to the keyboard scan code according to the user's application configuration.
S204、编码后通过所述通讯线向所述上位机配置单元发送编码数据。S204. After encoding, send the encoded data to the host computer configuration unit through the communication line.
S205、所述上位机配置单元判断所有按键对应的码值设定完成后判别键值是否正确。S205. The host computer configuration unit judges whether the key values are correct after the code values corresponding to all keys are set.
S206、所述上位机配置单元通过配置下载数据口6将通过键值判别正确的键值配置信息导入到所述中央处理器以完成配置。S206. The configuration unit of the upper computer imports the correct key value configuration information identified by the key value to the central processing unit through the configuration download data port 6 to complete the configuration.
可选地,所述根据用户的应用配置对相应指定按键按照键盘扫描码进行键值编码,包括:Optionally, performing key-value coding on the corresponding specified key according to the keyboard scan code according to the user's application configuration includes:
所述根据用户的应用配置对相应指定按键按照键盘扫描码以预定码值发送顺序将码值进行发送。According to the user's application configuration, the code value is sent to the corresponding specified key according to the keyboard scan code in a predetermined code value sending sequence.
可选地,所述预定码值发送顺序,包括:Optionally, the sending order of the predetermined code value includes:
若为标准键值则直接进行通码加断码的编码;或If it is a standard key value, directly encode the pass code plus the break code; or
若为功能组合键则分别按顺序发组合通码,再按相反的顺序发组合断码;或If it is a function combination key, send the combined pass code in sequence, and then send the combined break code in the reverse order; or
若为数据组合键则按照数据编码的顺序连续发送对应数据的通码、断码实现数据组合。If it is a data combination key, the pass code and break code of the corresponding data are sent continuously according to the sequence of data encoding to realize data combination.
可选地,所述编码后通过所述通讯线向所述上位机配置单元发送编码数据之前,还包括:Optionally, before sending the encoded data to the host computer configuration unit through the communication line after the encoding, it also includes:
判断所述上位机配置单元是否允许发送,若允许则执行后续步骤。It is judged whether the configuration unit of the upper computer is allowed to send, and if it is allowed, the subsequent steps are performed.
可选地,所述上位机配置单元判断所有按键对应的码值设定完成后判别键值是否正确,包括:Optionally, the host computer configuration unit judges whether the key values are correct after the code values corresponding to all keys are set, including:
所述上位机配置单元判断所有按键对应的码值设定完成后判别每个键值的设定通码和断码是否成对出现,若是则键值判别正确。After the host computer configuration unit judges that the code values corresponding to all keys are set, it judges whether the setting pass code and break code of each key value appear in pairs, and if so, the key value judgment is correct.
本实施例中,中央处理器为PIC单片机PIC16F886处理器,中央处理器上电后首先进行程序初始化,同时在初始化的过程中,如果接收到计算机指令要进行回复处理,如果没有收到上位机指令则进行按键扫描,确定是否有按键按下;扫描到按键后进行按键编码,根据用户的应用配置对相应指定按键按照键盘扫描码进行键值编码,码值的发送顺序为先发送通码再发送断码的方式。如果为标准键值则直接进行“通码”加“断码”的编码;如果为组合按键,则考虑为功能组合键还是数据组合键,若为功能组合键则分别按顺序发组合通码,再按相反的顺序发组合断码;如果为数据组合键则按照数据编码的顺序连续发送对应数据的通码、断码实现数据组合。In this embodiment, the central processing unit is a PIC single-chip microcomputer PIC16F886 processor. After the central processing unit is powered on, the program initialization is first carried out. Then scan the key to determine whether there is a key pressed; after the key is scanned, the key is coded, and the corresponding specified key is coded according to the keyboard scan code according to the user's application configuration. The order of sending the code value is to send the pass code first and then send The way to break the code. If it is a standard key value, the encoding of "pass code" plus "break code" is directly carried out; if it is a combination key, then it is considered whether it is a function combination key or a data combination key, and if it is a function combination key, then the combined pass code is sent in sequence, Then send combined breaking codes in the opposite order; if it is a data combination key, then continuously send the corresponding data's pass code and break code to realize data combination according to the order of data encoding.
编码后在上位机允许发送时发送PS2数据,经过外部接口转换芯片4实现PS2数据到USB数据的转换后输出到上位机,选择USB接口形式增加了键盘通用性,方便插拔操作。After encoding, the PS2 data is sent when the upper computer allows sending, and the external interface conversion chip 4 realizes the conversion of PS2 data to USB data and then outputs to the upper computer. Selecting the USB interface form increases the versatility of the keyboard and facilitates plugging and unplugging operations.
上位机配置单元可以采用计算机图形化设计,通过软件编程实现,将实物键盘的示意图显示于人机交互界面,用户用鼠标点击任意按键,即可弹出该键的键值输入界面,用户通过点击通码或断码下拉菜单,选择相应的码值,即可完成码值输入;一个码值输入完成后,点击“增加”按键,再通过下拉菜单选择其他码值输入,依此类推可完成组合码值的设定;所有按键对应的码值设定完成后,点击保存按钮,系统会自动判别键值的正确性,即每个键值的设定通码和断码都是成对出现的,键值判别正确,则系统通过配置下载数据口6将键值的配置信息导入到键盘中配置编码操作完成。The configuration unit of the upper computer can be designed by computer graphics and realized by software programming. The schematic diagram of the physical keyboard is displayed on the human-computer interaction interface. When the user clicks any button with the mouse, the key value input interface of the button will pop up. Code or broken code drop-down menu, select the corresponding code value to complete the code value input; after entering a code value, click the "Add" button, and then select another code value input through the drop-down menu, and so on to complete the combined code Value setting; after the code values corresponding to all keys are set, click the save button, and the system will automatically judge the correctness of the key values, that is, the set codes and break codes of each key value appear in pairs. If the key value is judged correctly, the system will import the configuration information of the key value into the keyboard through the configuration download data port 6 to complete the configuration coding operation.
本发明实施例中提供的键值自定义键盘配置系统及方法,包括上位机配置单元、自定义键盘及通讯线,所述上位机配置单元用于为所述自定义键盘的每一个单键或组合键进行编码,所述通讯线用于连接所述上位机配置单元和所述自定义键盘,所述自定义键盘包括多个按键、中央处理器、配置下载数据口,所述中央处理器分别与所述按键及所述配置下载数据口电连接,所述中央处理器对所述多个按键进行扫描获得每个按键的按键扫描码,当检测到有按键被按下时扫描到指定按键后进行按键编码,根据接收到的应用配置对相应所述指定按键按照键盘扫描码进行键值编码,编码后通过所述通讯线向所述上位机配置单元发送编码数据,直至所有按键对应的键值设定完成后所述上位机配置单元通过配置下载数据口将通过键值判别正确的键值配置信息导入到所述中央处理器以完成配置,可利用该键盘输入所定义的标准键值或组合键,满足不同用户对键盘键值的不同需求。The key-value custom keyboard configuration system and method provided in the embodiments of the present invention include a host computer configuration unit, a custom keyboard and a communication line, and the host computer configuration unit is used for each single key or key of the custom keyboard. The combination key is coded, and the communication line is used to connect the configuration unit of the host computer and the custom keyboard, and the custom keyboard includes a plurality of keys, a central processing unit, and a configuration download data port, and the central processing unit is respectively Electrically connected to the button and the configuration download data port, the central processing unit scans the plurality of buttons to obtain the button scan code of each button, and scans the specified button when it detects that a button is pressed Carry out key coding, according to the received application configuration, carry out key value coding on the corresponding specified key according to the keyboard scan code, after coding, send the encoded data to the configuration unit of the host computer through the communication line, until the key value corresponding to all the keys After the setting is completed, the configuration unit of the upper computer will import the correct key value configuration information through the key value judgment to the central processing unit through the configuration download data port to complete the configuration, and the keyboard can be used to input the defined standard key value or combination key to meet the different needs of different users for keyboard key values.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,RandomAccess Memory)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: Read Only Memory (ROM, Read Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.
以上对本发明所提供的一种键值自定义键盘配置系统及方法进行了详细介绍,对于本领域的一般技术人员,依据本发明实施例的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A key value custom keyboard configuration system and method provided by the present invention have been introduced in detail above. For those of ordinary skill in the art, according to the idea of the embodiment of the present invention, there will be changes in the specific implementation and application scope. In summary, the content of this specification should not be construed as limiting the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711335298.1A CN108089722A (en) | 2017-12-14 | 2017-12-14 | A kind of key assignments customizing keyboard configures system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711335298.1A CN108089722A (en) | 2017-12-14 | 2017-12-14 | A kind of key assignments customizing keyboard configures system and method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108089722A true CN108089722A (en) | 2018-05-29 |
Family
ID=62175461
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711335298.1A Pending CN108089722A (en) | 2017-12-14 | 2017-12-14 | A kind of key assignments customizing keyboard configures system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108089722A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109814735A (en) * | 2019-01-25 | 2019-05-28 | 山东超越数控电子股份有限公司 | Key assignments after key bounces sends processing method and system |
CN110069144A (en) * | 2019-04-22 | 2019-07-30 | 山东超越数控电子股份有限公司 | A kind of button design method for supporting custom feature |
CN110569091A (en) * | 2019-09-02 | 2019-12-13 | 深圳市丰润达科技有限公司 | single chip microcomputer key processing method and device and computer readable storage medium |
CN111625108A (en) * | 2020-05-22 | 2020-09-04 | 深圳市海邻科信息技术有限公司 | Key simulation method, device, equipment and storage medium based on USB module |
CN113760790A (en) * | 2021-09-08 | 2021-12-07 | 东莞市海能电子有限公司 | Configuration and transmission method, device and docking station of docking station information command |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1310397A (en) * | 2000-02-24 | 2001-08-29 | 英业达股份有限公司 | Computer keyboard detection method |
US20070143689A1 (en) * | 2005-12-21 | 2007-06-21 | International Business Machines Corporation | User-relocatable self-defining buttons to control machinery |
CN101042612A (en) * | 2006-03-21 | 2007-09-26 | 鸿富锦精密工业(深圳)有限公司 | Self-defined keyboard, self-defined keyboard converting device and self-defined method of the keyboard |
CN101158885A (en) * | 2007-10-22 | 2008-04-09 | 李玫 | User-defined keyboard and implementing method thereof |
-
2017
- 2017-12-14 CN CN201711335298.1A patent/CN108089722A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1310397A (en) * | 2000-02-24 | 2001-08-29 | 英业达股份有限公司 | Computer keyboard detection method |
US20070143689A1 (en) * | 2005-12-21 | 2007-06-21 | International Business Machines Corporation | User-relocatable self-defining buttons to control machinery |
CN101042612A (en) * | 2006-03-21 | 2007-09-26 | 鸿富锦精密工业(深圳)有限公司 | Self-defined keyboard, self-defined keyboard converting device and self-defined method of the keyboard |
CN101158885A (en) * | 2007-10-22 | 2008-04-09 | 李玫 | User-defined keyboard and implementing method thereof |
Non-Patent Citations (1)
Title |
---|
龙顺宇编著: "《深入浅出STM8单片机入门、进阶与应用实例》", 30 September 2016, 北京航空航天大学出版社 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109814735A (en) * | 2019-01-25 | 2019-05-28 | 山东超越数控电子股份有限公司 | Key assignments after key bounces sends processing method and system |
CN109814735B (en) * | 2019-01-25 | 2023-04-07 | 超越科技股份有限公司 | Key value sending processing method and system after key bounce |
CN110069144A (en) * | 2019-04-22 | 2019-07-30 | 山东超越数控电子股份有限公司 | A kind of button design method for supporting custom feature |
CN110569091A (en) * | 2019-09-02 | 2019-12-13 | 深圳市丰润达科技有限公司 | single chip microcomputer key processing method and device and computer readable storage medium |
CN110569091B (en) * | 2019-09-02 | 2022-12-02 | 深圳市丰润达科技有限公司 | Single chip microcomputer key processing method and device and computer readable storage medium |
CN111625108A (en) * | 2020-05-22 | 2020-09-04 | 深圳市海邻科信息技术有限公司 | Key simulation method, device, equipment and storage medium based on USB module |
CN111625108B (en) * | 2020-05-22 | 2023-07-14 | 深圳市海邻科信息技术有限公司 | Button simulation method, device, equipment and storage medium based on USB module |
CN113760790A (en) * | 2021-09-08 | 2021-12-07 | 东莞市海能电子有限公司 | Configuration and transmission method, device and docking station of docking station information command |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108089722A (en) | A kind of key assignments customizing keyboard configures system and method | |
US8417971B2 (en) | Data processing device and data processing method | |
US9111005B1 (en) | Systems and methods for configuring and controlling variable pressure and variable displacement sensor operations for information handling systems | |
TWI252419B (en) | User-programmable input device with keypad | |
EP2997463B1 (en) | Extraction of operating system-specific characteristics via a communication interface | |
CN101772761A (en) | Electronic device interface control system | |
US20070038731A1 (en) | Information processing apparatus, selector, remote operation system, scan code transmission method, and program product therefor | |
CN101901058A (en) | Wireless keyboard and mouse transceiver | |
US20130217338A1 (en) | Method of multi-target switch transmission through an externally connected bluetooth selection device | |
CN101364152A (en) | Method, system and mouse capable of implementing custom mouse button function | |
CN105138151A (en) | Mouse and method capable of achieving customized mouse button functions | |
CN110162284B (en) | Control interface device and control system thereof | |
AU2017410256B2 (en) | Testing devices and methods for testing a device driver software | |
CN110604590A (en) | A control method based on ultrasonic equipment and ultrasonic equipment | |
CN104217182A (en) | Display with mobile high-definition connection port and signal processing method thereof | |
CN105988946A (en) | Input interface device of mobile device | |
CN102650907B (en) | Method and device for executing device functions by using key combination instead of Fn key | |
CN205318337U (en) | Can realize mouse of self -defined mouse button function | |
WO2015035609A1 (en) | Method and device for simultaneously uploading keyboard key codes | |
EP3606150A1 (en) | Data transmission method, sending-end device and receiving-end device | |
CN204189165U (en) | A kind of smart machine and embedded device carry out the device of data transmission | |
CN116483760B (en) | Interaction methods, devices, chips, keyboards, electronic devices and media | |
KR100353878B1 (en) | The extended Keypad Controller and the controlling method | |
TWI220494B (en) | Device for simulating the handheld electronic device as a joystick and the method thereof | |
CN100374996C (en) | Method for providing three-dimensional input information for computer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180529 |
|
RJ01 | Rejection of invention patent application after publication |