0

I want to ditch Razer Synapse because it eats up to 600MB of RAM for nothing. I just want to use my macros for two additional keys found on my Razer Deathadder. I've sucessfully captured the HID packets for my Corsair K95 keyboard with C++ HID API and executed my macros, finally was able to say bye bye to iCUE. But I'm not able to open mouse as HID device. Everything should be configured properly, VID/PID, UsagePage and Usage too. But the interesting thing is that wireshark is able to capture the mouse, for me it doesn't for even when I try to open it with admin priveliges. Does somebody have any idea what I should do?

I've tried hidapitester application which is part of HIDAPI C++ library, it automatically closes the device and doesn't receive anything. If it's not possible to solve it in this way, which approach I should use to be able to capture the packets?

Thank you.

kurta999
  • 60
  • 8
  • In the meantime I found out that it's not really possible to catch the HID packets for my mouse by HIDAPI, that's the miracle, that it worked for the Corsair keyboard... – kurta999 Feb 19 '23 at 09:04

1 Answers1

1

You cannot open keyboard and mouse hid device handles for a security reasons (so you can’t write a keylogger etc). It by design in Windows.

https://learn.microsoft.com/en-us/windows-hardware/drivers/hid/top-level-collections-opened-by-windows-for-system-use

Official workaround is to write a keyboard/mouse filter driver. https://learn.microsoft.com/en-us/samples/microsoft/windows-driver-samples/mouse-input-wdf-filter-driver-moufiltr/

DJm00n
  • 1,083
  • 5
  • 18
  • Thanks, in the meantime I've found the same thing after a lot of browsing. I just don't understand why it worked for Corsair K95 keyboard, because it shouldn't. Maybe it registers itself differently, I don't have idea. It just works. Once if I'll have lot of free time, I will try to play with that driver what you sent. – kurta999 Apr 01 '23 at 07:55
  • 1
    many keyboards/mouses have a vendor-defined report usages in addition to standard keyboard/mouse reports - and you may see these in your Corsair K95 keyboard case. or maybe your keyboard have already a custom driver that allows it. – DJm00n Apr 02 '23 at 10:48