| View previous topic :: View next topic |
| Author |
Message |
Micha
Joined: 15 Nov 2005 Posts: 433 Location: Germany
|
Posted: Tue Nov 15, 2005 11:26 am Post subject: DLLCall: Support for Human Interface devices |
|
|
Hi,
my remote control has a USB-Receiver. This gadget is recognized by Windows as a HID-device. In your own application you are not able to receive any input without registering the correct device.
I wanted to use ALL keys on my remote control to remote control my computer and my software-DVD-player.
As written above, without registering the device Autohotkey wasn't informed by the OS if a key was pressed on the remote control.
I've tried to make a DLL which can be used by the Autohotkey-DLLCALL-feature to support such devices.
At http://autohotkey.net/~Micha/HIDsupport/Autohotkey.html
you can download an archive with the needed files.
I've tried to write a little more information on that webspace (in very bad english, sorry )
If you have any questions or problems, you can send me a message or post to this forum
Ciao
Micha
Last edited by Micha on Mon Aug 27, 2007 9:33 pm; edited 4 times in total |
|
| Back to top |
|
 |
not-logged-in-daonlyfreez Guest
|
Posted: Tue Nov 15, 2005 12:05 pm Post subject: |
|
|
Looks very good!
I tried the script, but it errors out on me:
| Quote: | | GetDeviceCount fehlgeschlagen. Errorcode: -3 |
I'm on Win2k/SP4, all updates...
But very cool ...
I trust you found the WinLIRC script by Chris? Could your DLL be used to capture input from 'all' remotes (i.e.: make WinLIRC unneeded for it)? |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 433 Location: Germany
|
Posted: Tue Nov 15, 2005 12:29 pm Post subject: < Windows XP |
|
|
Hi not-logged-in-daonlyfreez,
sorry, I forgot to mention that the Windows API only supports Windows XP . I've updated my webpage with this clue.
The errorcode -3 says:
ERROR_PATH_NOT_FOUND: The system cannot find the path specified.
It seems that the script was not able to find the DLL.
| Quote: | | I trust you found the WinLIRC script by Chris? Could your DLL be used to capture input from 'all' remotes (i.e.: make WinLIRC unneeded for it)? |
As far as i know, winlirc supports (almost any) serial attached IR-devices. It interprets the signals from any remote control.
My code only works for devices windows is able to recognize.
That is winlirc is doing a great job to use almost any remote control, my dll only calls Windows-APIs to support HID-devices.
Ciao
Micha |
|
| Back to top |
|
 |
not-logged-in-daonlyfreez Guest
|
Posted: Tue Nov 15, 2005 2:13 pm Post subject: |
|
|
Your script and dll were in the same folder.
Got this (more clarifying) errormessage now too:
| Quote: | | The procedure entry point GetRawInputData could not be located in the dynamic link library USER32.dll. |
Any chance of making this work on other Windows OSs too? |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 433 Location: Germany
|
Posted: Tue Nov 15, 2005 2:28 pm Post subject: |
|
|
| Quote: | The procedure entry point GetRawInputData could not be located in the dynamic link library USER32.dll.
Any chance of making this work on other Windows OSs too? |
This means, I've used a function that your OS is unable to find in its system-dlls, because they doesn't exists before Windows XP.
I'm sorry, but I think it's not possible to make this work on earlier OS's without enourmous work.
Ciao
micha |
|
| Back to top |
|
 |
evl
Joined: 24 Aug 2005 Posts: 1238
|
Posted: Tue Dec 27, 2005 12:44 am Post subject: |
|
|
@Micha:
Interesting stuff! Wish I'd realised your dll could handle USB keyboards earlier as it seems to detect all the media buttons when I press them!
I've not had a chance to examine the code yet, but playing with your AutoHotkeyRemoteControlDLL script, I've found that the media keys are detected as an HID device, while the scroll wheel on the keyboard is detected by a mouse device (looks like its values should be distinguishable from the actual mouse) and 2 other extra buttons are similarly detected by the main keyboard device, but again should be distinguisable from the normal keys they sort of duplicate.
I've disabled the keyboard's own program from starting (that managed the key presses and ran programs, etc) and I'm hoping to customise their actions now, which wasn't really possible before  |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 433 Location: Germany
|
Posted: Tue Dec 27, 2005 9:31 pm Post subject: |
|
|
| @evl: I'm glad that my little work can help you ! |
|
| Back to top |
|
 |
Psi-Jack
Joined: 24 Dec 2005 Posts: 7 Location: Austin, TX
|
Posted: Wed Dec 28, 2005 4:21 pm Post subject: Very nice stuff.. |
|
|
Hello Micha. First of all, I wanted to say:
EXCLENT WORK
This is absolutely wonderful work. I could finally re-hook my keyboard back up normally through USB, instead of that god-awful PS/2 hack.
Among that, of course, using other USB-based deviced for ahk as well, which could be useful.
I noticed, in your samples, though, a bit of a flaw.
In your InputMsg, you should localize the Vals variable, so that each time the function is used, it's a fresh new Vals v ariable. I noticed that very quickly when I kept getting a big HUGE page of Vals in a MsgBox, when I had that on for finding keys. It still happends, occasionally even with it, but it certainly cleared it up a bit.
Anyone for ideas?
I'm trying to take HID-keys that give no scancode, and essentially re-send them back through as custom vk+sc key sequences. But I tried doing that with my script as-is, but, ahk keeps flagging them for ignored, and won't actually proccess the keystrokes. :/
And, also, anyone know of a VK and SC table of keys? With me re-mapping (or trying to), these buttons to scancodes, I want to help make sure I'm not using existing ones elsewhere, or.. I guess I could just plug it up to PS/2, and re-map them to what it would report. Didn't think of that till now. Oh well.
I do need help, though, as to why virtually-made scancodes aren't working. :/
-- Psi-Jack |
|
| Back to top |
|
 |
evl
Joined: 24 Aug 2005 Posts: 1238
|
Posted: Wed Mar 29, 2006 12:47 am Post subject: |
|
|
Time to say thanks for this excellent dll file again I just got a Logitech USB Headset 350 with an in-line remote and your dll allows me to display the volume when I press the up and down buttons (pity the Mic mute button doesn't send a message too). Thanks again
(I'll post a script for the headset soon) |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1717
|
Posted: Tue May 30, 2006 7:56 pm Post subject: |
|
|
Hi Micha
this looks great!
I've a Tv tuner card with remote... got anything for that?
a recent similar post brought me here. _________________
 |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 433 Location: Germany
|
Posted: Tue May 30, 2006 9:02 pm Post subject: |
|
|
Hi Rajat,
welcome back!
Well, you can try, if your remote control is recognized as HID-Device.
If the functionality is on the board, the possibility is high that you need special drivers to communicate with the remote control and my dll is useless for you.
If it doesn't work, you could post the exact name and revision of your card and I can google if there's a SDK or something out there.
Ciao
Micha |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1717
|
Posted: Tue May 30, 2006 10:15 pm Post subject: |
|
|
thanks!
no the remote doesn't show in HID... checked that before my last post.
it plugs into the tuner card. the model is generally knows as a Philips SAA713x model (mine's 7130).
don't bother going out of the way on this... i just meant to ask if there's a way i could use the .dll u've already worked on, with my IR receiver. _________________
 |
|
| Back to top |
|
 |
XavierGr
Joined: 15 Jul 2006 Posts: 42
|
Posted: Sat Jul 15, 2006 1:36 am Post subject: |
|
|
Hello Micha!
Seems to be extraordinary work!
Do you think that it can work with logitech mice that are recognized as HID devices?
I am trying to find a way to utilize all my special mouse buttons without the need of Logitech's Setpoint program (which is crap by the way).
Main problem is that vk sc codes can't be sniffed by #InstallMouseHook.
I thought of other ways such as "GetMessage" but that didn't worked either.
I played with DllCall too, but I was quickly lost.
I will give a try to your way and if this works I will be greatfull to you. _________________ One hotkey to rule them all! |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 433 Location: Germany
|
Posted: Tue Jul 18, 2006 11:51 am Post subject: |
|
|
Hi XavierGr,
sorry for answering so late, but my main job at home is cutting my 4.5 h marriage video
I have a 5 button M$ mouse. I'll try to get it work with the dll.
If it works there's a change that Logitec mice are working too.
I'll post if I have news
Ciao
Micha |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 433 Location: Germany
|
Posted: Tue Jul 25, 2006 11:33 am Post subject: |
|
|
Hi,
yes it should work. I've tested it with a M$ and a Logitech USB-Mouse
The demoscript states
Leftclick: 1
RightClick: 2
Middle: 4
4th Button: 8
5th Button 16
Ciao
Micha |
|
| Back to top |
|
 |
|