I know it's bad form to bump your own post but I'm hoping that some of you that were busy during the holidays may be able to help me with this now.
Merry Christmas Eve.
I know you're all spending time with your families but as usual I'm try to solve some of my problems.
I asked this awhile back but I'm still trying to figure it out. I have done a lot of studying and research and I have found a lot of new information. Hopefully someone can point me in the right direction.
To recap, I have a Gyration Media Center remote that all the buttons except the "Power" button are seen by AHKHID. It is only labeled "Power", it does not send any system commands. EventGhost does see the button and identifies it as Button-1. Button ID in EventGhost and AHKHID for all the buttons except the power button match. EventGhost sees four HID devices but doesn't list usage page info, AHKHID only sees three usage pages 12, 65280, 65486. I concluded the power button is on a usage page by itself.
Using the tool HidTest "
http://www.lvr.com/hidpage.htm" I was able to determine that the usage page for the power button is 128 and the usage is 1. Looking at this chart I was able to find what all the usage pages are for. The chart is on page 15 of this document.
http://www.usb.org/developers/devclass_docs/Hut1_11.pdf
My first question is am I reading this chart correctly because if I am this just confuses me more. The usage pages are;
Code:
12 - consumer device
65280 - Vendor defined
65468 - Vendor defined
and
128 - Monitor
It seems very strange that the power button on a remote was assigned a monitor usage page.
I tried entering the usage page into AHKHID "Example 2" and into the example "Creating a script" but it still will not see the button.
So looking at AHKHID itself I followed the structure of "Creating a script" and tested the functions starting at the top testing "Get Device Count". I made this script to view the data.
Code:
;AHKHID_UseConstants()
Gui, Add, Edit, xm w50 vdevcount,
Gui, Add, Text, x+10, Device Count
Gui, Add, Edit, xm w50 velevel,
Gui, Add, Text, x+10, Error Level
Gui, Show, y0
iCount := AHKHID_GetDevCount()
GuiControl, , devcount, %iCount%
GuiControl, , elevel, %ErrorLevel%
Return
It comes back with a device count of 10, which is what AHKHID "Example 1" sees, and an error level of 0 and has the same result if I include "Use Constants". Of course the tool HidTest sees a device count of 11. This makes me think that for some reason AHKHID is not reading all USB HID devices as it should. It seems to see usage pages lower and higher than this but doesn't see this one. Maybe it has an error or just needs to be tweeked but with my limited experience I can't tell what it may be so I'm stuck and don't know where else to look for more information.
Here is my... well you could call it deductive reasoning, as to why I believe there is a way to get AHKHID to recognize this button.
1. EventGhost sees it as a HID compliant device just like most of the rest of the buttons on the remote.
2. HidTest sees it as an HID device.
3. I've read in several places that there is no need to have special drivers for any USB device. The native windows drivers can handle any USB function.
If anyone can offer any advice at all I would greatly appreciate it. Getting this one little button working is something I want very badly, for more reasons than just having use of the button. I want to be able to expand this script I'm working on so more people can use their HID devices with AHK.
http://www.autohotkey.com/forum/viewtopic.php?t=41397&start=256
OH, I'm using Win XP SP3.
Thanks for any help you can give me.