我司目前想通過CH554通過串口接收Android主板USB mouse事件(比如mouse 坐標(biāo)以及滾輪事件(前滾,后滾)基本功能)來實(shí)現(xiàn)對(duì)其他PC的反控功能。目前實(shí)現(xiàn)可以進(jìn)行鼠標(biāo)左邊、右鍵以及鼠標(biāo)移動(dòng)的反控,但是wheel控制時(shí),被反控的windows端沒有反應(yīng)。目前Android下發(fā)的wheel前滾后滾事件被映射成0x01, 0xff兩個(gè)值,我這邊的報(bào)告描述符如下:
??????0x05,?0x01,????????//?Usage?Page?(Generic?Desktop?Ctrls) ????0x09,?0x02,????????//?Usage?(Mouse) ????0xA1,?0x01,????????//?Collection?(Application) ????0x85,?MOUSE_EVT_REPORT_ID,????????/*?REPORT_ID?(04)?*/ ????0x09,?0x01,????????//???Usage?(Pointer) ????0xA1,?0x00,????????//???Collection?(Physical) ????/*1byte?for?button*/ ????0x05,?0x09,????????//?????Usage?Page?(Button) ????0x19,?0x01,????????//?????Usage?Minimum?(0x01),?1?left?key,?2?right?key,?3?middle?key ????0x29,?0x03,????????//?????Usage?Maximum?(0x03) ????0x15,?0x00,????????//?????Logical?Minimum?(0) ????0x25,?0x01,????????//?????Logical?Maximum?(1) ????0x75,?0x01,????????//?????Report?Size?(1):? ????0x95,?0x03,????????//?????Report?Count?(3):?3bit?to?describe?key?event,?bit-0{left},?bit-1{right},?bit-2{middle};?set?1?for?press,?0?for?release ????0x81,?0x02,????????//?????Input?(Data,Var,Abs,No?Wrap,Linear,Preferred?State,No?Null?Position) ????0x75,?0x05,????????//?????Report?Size?(5) ????0x95,?0x01,????????//?????Report?Count?(1):?5bit?padding?for?byte?align,?should?set?all?0 ????0x81,?0x03,????????//?????Input?(Const,Array,Abs,No?Wrap,Linear,Preferred?State,No?Null?Position) ????0x05,?0x01,????????//?????Usage?Page?(Generic?Desktop?Ctrls) ????0x09,?0x38,????????//?????USAGE?(Wheel) ????0x15,?0x81,?????????//????????Logical?Minimum?(127) ????0x25?,?0x7f,?????????//???????LOGIC_MAX?(-127):?0x01?scroll?forward,?0xff:?scroff?back ????0x75,?0x08,??????????//???????REPORT_SIZE?(8) ????0x95,?0x01,??????????//???????REPORT_COUNT?(1) ????0x81,?0x06,????????????//?????Input?(Data,Var,Res,No?Wrap,Linear,Preferred?State,No?Null?Position) ????0x09?,?0x30?,??????//???????USAGE?X? ????0x15,?0x00,?????????//????????Logical?Minimum?(0) ????0x26?,?0x00?,?0x10,??//???????LOGIC_MAX?(0X1000)? ????0x35?,?0x00?,????????//???????PHYSICAL_MIN?(0) ????0x46?,?0x00?,?0x10?,?//???0x79?,?0x08?????PHYSICAL_MAX?(0X1000) ????0x75,?0x10,??????????//???????REPORT_SIZE?(16) ????0x95,?0x01,??????????//???????REPORT_COUNT?(1) ????0x81?,?0x02?,????????//???????INPUT?(Data,Var,ABS) ????0x09?,?0x31?,????????//?????USAGE?Y ????0x15,?0x00,?????????//????????Logical?Minimum?(0) ????0x26?,?0x00?,?0x10,??//???????LOGIC_MAX?(0X1000) ????0x35?,?0x00?,????????//???????PHYSICAL_MIN?(0) ????0x46?,?0x00?,?0x10,??//??0x4c?,?0x05?????PHYSICAL_MAX?(0X1000) ????0x75,?0x10,??????????//???????REPORT_SIZE?(16) ????0x95,?0x01,??????????//???????REPORT_COUNT?(1) ????0x81?,?0x02?,???????//????????INPUT?(Data,Var,Abs) ????0xC0,??????????????//???End?Collection ????0xC0,??????????????//?End?Collection
還麻煩指點(diǎn)一下wheel的控制。 PS:通過USB轉(zhuǎn)包,也能看見數(shù)據(jù)包按照report描述符進(jìn)行了上報(bào),但是windows端對(duì)wheel沒啥反應(yīng)。