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 https://ahknet.autoh...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 :wink: )
If you have any questions or problems, you can send me a message or post to this forum
Ciao
Micha
Edit 04/2009 : Good things needs a while:-) TheGood created a script which does not need an extra dll. Please have a look at his post at
http://www.autohotke...topic41397.html
DLLCall: Support for Human Interface devices
Started by
Micha
, Nov 15 2005 10:26 AM
43 replies to this topic
#1
-
Posted 15 November 2005 - 10:26 AM
Looks very good!
I tried the script, but it errors out on me:
I'm on Win2k/SP4, all updates...
But very cool 8) ...
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)?
I tried the script, but it errors out on me:
GetDeviceCount fehlgeschlagen. Errorcode: -3
I'm on Win2k/SP4, all updates...
But very cool 8) ...
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)?
#2
-
Posted 15 November 2005 - 11:05 AM
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.
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
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.
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
#3
-
Posted 15 November 2005 - 11:29 AM
Your script and dll were in the same folder.
Got this (more clarifying) errormessage now too:
Any chance of making this work on other Windows OSs too?
Got this (more clarifying) errormessage now too:
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?
#4
-
Posted 15 November 2005 - 01:13 PM
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
#5
-
Posted 15 November 2005 - 01:28 PM
@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
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
#6
-
Posted 26 December 2005 - 11:44 PM
@evl: I'm glad that my little work can help you !
#7
-
Posted 27 December 2005 - 08:31 PM
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. :twisted:
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
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. :twisted:
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
#8
-
Posted 28 December 2005 - 03:21 PM
Time to say thanks for this excellent dll file again :lol: 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)
(I'll post a script for the headset soon)
#9
-
Posted 28 March 2006 - 11:47 PM
Hi Micha
this looks great!
I've a Tv tuner card with remote... got anything for that?
a recent similar post brought me here.
this looks great!
I've a Tv tuner card with remote... got anything for that?
a recent similar post brought me here.
#10
-
Posted 30 May 2006 - 06:56 PM
CleanNews.in : Bite sized latest news headlines from India with zero bloat
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
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
#11
-
Posted 30 May 2006 - 08:02 PM
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.
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.
#12
-
Posted 30 May 2006 - 09:15 PM
CleanNews.in : Bite sized latest news headlines from India with zero bloat
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.
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.
#13
-
Posted 15 July 2006 - 12:36 AM
One hotkey to rule them all!
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
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
#14
-
Posted 18 July 2006 - 10:51 AM
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
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
#15
-
Posted 25 July 2006 - 10:33 AM