5TDT7IlA4

CV Engineer Keyboard (self-made)

 
Overview

[Reference Project](https://oshwhub.com/pomin/diy-jian-pan)
![image.png] `
```
void KeyAction(unsigned char keyCode) {
switch(Key_msg) {
case 1://Find the value in key.h, corresponding to the keyboard letter

HIDKey[0] = 0x29; ///HIDKey[0] is for Ctrl, Shift, Alt, etc. Here it is the left Ctrl 0x01
HIDKey[2] = 0x29; // HIDKey[2]-HIDKey[7] are the first to sixth keys pressed, here 0x06 is c
if(Ready) //HIDValueHandleMul();
HIDValueHandle();// Ordinary key upload
else USBDeviceInit();
break;
case 2:
HIDKey[0] = 0x01;
HIDKey[2] = 0x04;
if(Ready)
HIDValueHandle();
else USBDeviceInit();
break;
case 3:
HIDKey[0] = 0x01; //
HIDKey[2] = 0x16; //
if(Ready) //HIDValueHandleMul();
HIDValueHandle();// Ordinary key upload
else USBDeviceInit();
break;

case 4:
HIDKey[0] = 0x01;
HIDKey[2] = 0x1D;
if(Ready)
HIDValueHandle();// Normal key uploadelse
USBDeviceInit();
break;

case 5:
HIDKey[0] = 0x01; //
HIDKey[2] = 0x06; //
if(Ready) //HIDValueHandleMul();
HIDValueHandle();// Normal key uploadelse
USBDeviceInit();
break;
case 6:
HIDKey[0] = 0x01; //
HIDKey[2] = 0x19; //
if(Ready) //HIDValueHandleMul();
HIDValueHandle();// Normal key uploadelse
USBDeviceInit();
break;

case 7:
HIDKeyMUL[0] = KEY_MUL_VOL_ZERO; // Mute (EC11 is pressed)
if(Ready) HIDValueHandleMul();
else USBDeviceInit();
break;
case 21:
HIDKeyMUL[0] = KEY_MUL_VOL_UP; // Volume +
if(Ready) HIDValueHandleMul();
else USBDeviceInit();
break;
case 22:
HIDKeyMUL[0] = KEY_MUL_VOL_DOWN; // Volume - (EC11 knob)
if(Ready) HIDValueHandleMul();
else USBDeviceInit();
break;
default :
break;
}
}
```
`
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-22 21:49:18

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号