desowin / usbpcap

USB packet capture for Windows
http://desowin.org/usbpcap
926 stars 173 forks source link

[question] can usbpcap capture FN keys of the keyboard? #123

Closed blackholeearth closed 2 years ago

blackholeearth commented 2 years ago

can usbpcap capture FN keys of the keyboard?

if so, can i relay that to my c# applicaiton as event on_fn_key_pressed ??

thanks.

desowin commented 2 years ago

USBPcap captures all URBs so it can capture any keypress on USB keyboard connected to the hub that is captured. However, doing so in order to relay such information to C# application is really bad idea.

Basically, you would have to parse the USB HID descriptor and then process the incoming URBs. USBPcap does not perform such analysis and and never will (this is what Wireshark is for). If you really want to go that route, then be prepared to write a lot of code.

You are better off looking for Operating System API to achieve what you want.