Hello ddh819,
First of all, are you
sure there's nothing new that also shows up in the Other section of Example 1? As I said, an HID device can have multiple TLCs (with even some of the keyboard and mouse type).
If it doesn't appear in the Other tab, try this:
1. Plug in the device
2. Go to the Device Manager (one way to get there is Start>Run>type "devmgmt.msc" and Enter)
3. Right-click on the root item in the listview (which should be the name of your computer) and select "Scan for hardware changes"
4. After it is done scanning, launch Example 1 again and check if there's anything new in the Other section.
If after doing the steps above, it is still not appearing in the Other tab, then you can try to register the keyboard TLC and find a way to differentiate between your keyboard and the remote. To do this, check if in the Keyboards section of Example 1, there's anything (looking at each column) that sets your remote apart, like the Type, SubType, etc...
If there is something that you can use to differentiate your remote, then you'll be able to write a script (much like mine) which registers the keyboard TLC (UsPg 1, Us 6) and upon input (ie. upon receiving WM_INPUT messages), simply check whatever factor you decided upon by first retrieving the
handle of the device with HID_GetInputInfo(lParam, II_DEVHANDLE), and then retrieving the factor you want to check with HID_GetDevInfo(
handle, flag of the factor here - like DI_KBD_TYPE or DI_KBD_SUBTYPE etc..., True). Also, the more things you can use to narrow it down, the better.
For example, let's say you find out that your Kensington Presentation remote is of Type 4, which sets it apart from every other keyboard listed in the Keyboard tab of Example 1, then your InputMsg() function could look something like this:
Code:
InputMsg(wParam, lParam) {
Local devh
Critical
;Get handle of device
devh := HID_GetInputInfo(lParam, II_DEVHANDLE)
;Check for error
If (devh <> -1) ;Check that it is my Kensington Presentation remote
And (HID_GetDevInfo(devh, DI_DEVTYPE, True) = RIM_TYPEKEYBOARD) ;Make sure it's a keyboard
And (HID_GetDevInfo(devh, DI_KBD_TYPE, True) = 4) { ;Check if it's of Type 4 which means it has to be my remote
;Now you know it comes from your remote. You can treat the message using HID_GetInputInfo() and II_KBD_VKEY to find out which button was pressed.
}
}
There is however
a tradeoff in using the keyboard TLC for your device (which is why I wanted you to make sure you couldn't register it as an HID device instead). It's that you will not be able to stop the key presses the remote generates. This means that the buttons on the remote will always broadcast F5, PgDn, PgUp, and b even when you register it for your own purposes.
On the other hand, if you do end up finding an entry in the
Other section of Example 1, then you can make the remote stop generating those keyboard presses by doing the following steps:
1. Go to Device Manager
2. Expand the "Keyboards" tree
3. You should find a device (ie. your remote registered as a keyboard) other than your usual keyboard there. To make sure it is indeed your remote, you can compare the name you found in Example 1 with the name you'll find when you right-click>Properties>Details on the keyboard item in Device Manager.
4. Once you found the keyboard entry associated to your Kensington Presentation remote, right-click the item and select Uninstall
After doing those steps, the Kensington remote will no longer generate keyboard presses and you then can concentrate on the data received through the entry you found in the Other section of Example 1.
Hope this helps.