Registering devices for raw input

M

Marcus Stade

Hello!

I'm trying to recognize input from my remote control so that I can use
it to control various of my installed apps (winamp and vlc for
instance). I've managed to hook things up so that I can receive
WM_INPUT to my window even when it's not in focus. The problem is that
I receive WM_INPUT much too often. I receive it when a key is pressed,
and when it's depressed (like WM_KEYDOWN and WM_KEYUP, except those
aren't being sent, I only get WM_INPUT). I also receive it from any
device connected to my system, not only my remote.

Is there a way to get WM_INPUT messages from my remote control only?
It's of course imperative that I receive messages when my window is
hidden as well. And can I make it so I receive WM_KEYDOWN/WM_KEYUP
instead of WM_INPUT, or in other ways know wether the message was sent
when the key was pressed or depressed?

This is where I learned to use raw input and hence those are the
structures and functions I use (with P/Invoke of course):
http://msdn.microsoft.com/library/d...i/windowsuserinterface/userinput/rawinput.asp
 
M

Marcus Stade

No-one has a clue, huh? =(

Unfortunatly, it seems that my IR-receiver is actually busted now (or
something is ****ed up with my USB-ports, I'm not sure) so I can't
continue with my work. If however someone does know anything about raw
input, please do share.

I figured in the end (that being right before I couldn't receive any
more sígnals due to hardware malfunctioning) that I should just filter
the info I do get. After all, if I can make sure that I don't care
about input from my mouse and keyboard the only reasonable assumption
is that the info came from my remote control. Of course this is a
dangerous assumption, but I don't plan on releasing the software nor
add new peripherals to my stock right now so I think I'm safe.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top