Wheellがクリックされ、さまざまなマウスから解放されたという情報を取得する必要があります。私は組み込みデバイスで作業しており、生の形式(バイトストリーム)のすべてのデータにアクセスできます。
AFAIK転送されたすべてのバイトは、HIDレポート記述子マウスで説明されています。HIDレポート記述子と2つの異なるマウスから送信されたフレームの両方がありますが、それらを理解する方法がわかりません。
HID Logitech:
Interface 0 HID Report Descriptor Mouse
Item Tag (Value) Raw Data
Usage Page (Generic Desktop) 05 01
Usage (Mouse) 09 02
Collection (Application) A1 01
Usage (Pointer) 09 01
Collection (Physical) A1 00
Usage Page (Button) 05 09
Usage Minimum (Button 1) 19 01
Usage Maximum (Button 3) 29 03
Logical Minimum (0) 15 00
Logical Maximum (1) 25 01
Report Size (1) 75 01
Report Count (3) 95 03
Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02
Report Size (5) 75 05
Report Count (1) 95 01
Input (Cnst,Ary,Abs) 81 01
Usage Page (Generic Desktop) 05 01
Usage (X) 09 30
Usage (Y) 09 31
Usage (Wheel) 09 38
Logical Minimum (-127) 15 81
Logical Maximum (127) 25 7F
Report Size (8) 75 08
Report Count (3) 95 03
Input (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit) 81 06
End Collection C0
End Collection C0
Logitechフレーム4バイト、最初はボタン用:
00 00 00 00 : Button OFF (on release), X=0, Y=0, Whell=0
01 00 00 00 : Button 1 ON, X=0, Y=0, Whell=0
02 00 00 00 : Button 2 ON, X=0, Y=0, Whell=0
HID YACOSS:
Interface 0 HID Report Descriptor Mouse
Item Tag (Value) Raw Data
Usage Page (Generic Desktop) 05 01
Usage (Mouse) 09 02
Collection (Application) A1 01
Report ID (1) 85 01
Usage (Pointer) 09 01
Collection (Physical) A1 00
Usage Page (Button) 05 09
Usage Minimum (Button 1) 19 01
Usage Maximum (Button 3) 29 03
Logical Minimum (0) 15 00
Logical Maximum (1) 25 01
Report Count (3) 95 03
Report Size (1) 75 01
Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02
Report Count (1) 95 01
Report Size (5) 75 05
Input (Cnst,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 03
Usage Page (Generic Desktop) 05 01
Logical Minimum (-2047) 16 01 F8
Logical Maximum (2047) 26 FF 07
Report Size (12) 75 0C
Report Count (2) 95 02
Usage (X) 09 30
Usage (Y) 09 31
Input (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit) 81 06
Logical Minimum (-127) 15 81
Logical Maximum (127) 25 7F
Report Size (8) 75 08
Report Count (1) 95 01
Usage (Wheel) 09 38
Input (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit) 81 06
End Collection C0
Usage Page (Consumer Devices) 05 0C
Usage (AC Pan) 0A 38 02
Report Count (1) 95 01
Input (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit) 81 06
End Collection C0
Usage Page 06 F3 F1
Usage 0A F3 F1
Collection (Application) A1 01
Report ID (2) 85 02
Usage 09 00
Report Count (1) 95 01
Report Size (8) 75 08
Logical Minimum (0) 15 00
Logical Maximum (255) 26 FF 00
Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02
End Collection C0
YACOSSフレーム7バイト、ボタンの2番目:
01 00 00 00 00 00 00 Button 1 OFF (released), X=0, Y=0, Wheel=0, AC Pan=0
01 01 00 00 00 00 00 Button 1 ON , X=0, Y=0, Wheel=0, AC Pan=0
01 02 00 00 00 00 00 Button 2 ON , X=0, Y=0, Wheel=0, AC Pan=0