gpt4 book ai didi

c - 来自 GetRawInputDeviceList() 的原始输入设备太多

转载 作者:太空狗 更新时间:2023-10-29 16:55:57 25 4
gpt4 key购买 nike

之后

UINT lSize; 
GetRawInputDeviceInfo(hDevice, RIDI_DEVICEINFO, NULL, &lSize);
RID_DEVICE_INFO* lInfo = (RID_DEVICE_INFO*) malloc(lSize);
GetRawInputDeviceInfo(hDevice, RIDI_DEVICEINFO, lInfo, &lSize);

我有 9 个设备:3 个鼠标、3 个键盘、3 个隐藏设备。我有一个鼠标、一个触摸板、两个键盘和一个操纵杆。

剩下的是什么?

另一件事,我不确定给定的信息是否正确:

//keyboard #1
cbSize = 32
dwType = 1
keyboard.dwType = 81
keyboard.dwSubType = 0
keyboard.dwKeyboardMode = 1
keyboard.dwNumberOfFunctionKeys = 12
keyboard.dwNumberOfIndicators = 3
keyboard.dwNumberOfKeysTotal = 101

//keyboard #2 //keyboard 2
cbSize = 32
dwType = 1
keyboard.dwType = 81
keyboard.dwSubType = 0
keyboard.dwKeyboardMode = 1
keyboard.dwNumberOfFunctionKeys = 12 //~15
keyboard.dwNumberOfIndicators = 3
keyboard.dwNumberOfKeysTotal = 265 //~110

//keyboard #3 //keyboard 1
cbSize = 32
dwType = 7
keyboard.dwType = 81
keyboard.dwSubType = 0
keyboard.dwKeyboardMode = 1
keyboard.dwNumberOfFunctionKeys = 12
keyboard.dwNumberOfIndicators = 3
keyboard.dwNumberOfKeysTotal = 101 //~110


//mouse #1 //the touchpad
cbSize = 32
dwType = 0
mouse.dwId = 2
mouse.dwNumberOfButtons = 2
mouse.dwSampleRate = 60
mouse.fHasHorizontalWheel = 0 //1

//mouse #2 //the mouse
cbSize = 32
dwType = 0
mouse.dwId = 256
mouse.dwNumberOfButtons = 9 //5 buttons
mouse.dwSampleRate = 0 // the range is [-170,+170]
mouse.fHasHorizontalWheel = 0 //1

//mouse #3
cbSize = 32
dwType = 0
mouse.dwId = 32
mouse.dwNumberOfButtons = 3
mouse.dwSampleRate = 100
mouse.fHasHorizontalWheel = 0

//hid device #1 //the joystick
cbSize = 32
dwType = 2
hid.dwVendorId = 1699
hid.dwProductId = 1124
hid.dwVersionNumber = 275
hid.usUsagePage = 1
hid.usUsage = 4

//hid device #2
cbSize = 32
dwType = 2
hid.dwVendorId = 1452
hid.dwProductId = 545
hid.dwVersionNumber = 113
hid.usUsagePage = 12
hid.usUsage = 1

//hid device #3
cbSize = 32
dwType = 2
hid.dwVendorId = 1276
hid.dwProductId = 2049
hid.dwVersionNumber = 5649
hid.usUsagePage = 12
hid.usUsage = 1

那我哪里错了?如果这些信息是正确的,那么它们的含义是什么?先谢谢了!

最佳答案

发生这种情况是因为 windows 创建了一个可以捕获多个设备的设备(这是默认设备)它通常是您作为 GetRawInputDeviceList(.........)

示例:

kb0 = real keyboard 1 & real keyboard 2
kb1 = real keyboard 1
kb2 = real keyboard 2

mouse0 = touchpad+mouse
mouse1 = touchpad
mouse2 = mouse

关于c - 来自 GetRawInputDeviceList() 的原始输入设备太多,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6881114/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com