AutoHotkey Community

It is currently May 27th, 2012, 7:19 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 152 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next
Author Message
PostPosted: November 15th, 2005, 11:26 am 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
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 :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.autohotkey.com/forum/topic41397.html


Last edited by Micha on April 28th, 2009, 11:27 am, edited 6 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 15th, 2005, 12:05 pm 
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 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)?


Report this post
Top
  
Reply with quote  
 Post subject: < Windows XP
PostPosted: November 15th, 2005, 12:29 pm 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 15th, 2005, 2:13 pm 
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?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 15th, 2005, 2:28 pm 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 27th, 2005, 12:44 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
@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 :D


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 27th, 2005, 9:31 pm 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
@evl: I'm glad that my little work can help you !


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Very nice stuff..
PostPosted: December 28th, 2005, 4:21 pm 
Offline

Joined: December 24th, 2005, 1:27 pm
Posts: 7
Location: Austin, TX
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 29th, 2006, 12:47 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
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)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 30th, 2006, 7:56 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
Hi Micha

this looks great!
I've a Tv tuner card with remote... got anything for that? :)
a recent similar post brought me here.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 30th, 2006, 9:02 pm 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 30th, 2006, 10:15 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 15th, 2006, 1:36 am 
Offline

Joined: July 15th, 2006, 1:30 am
Posts: 48
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 18th, 2006, 11:51 am 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 25th, 2006, 11:33 am 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 152 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Yahoo [Bot] and 22 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group