Hi thanks for the reply, but it doesn't really help me. I've read the MSDN articles pretty thoroughly and that function basically only works on threads which have created a window using CreateWindow or CreateWindowEx and have a message pump. Since I've created the window on a separate thread, GetKeyboardState() only actually works if it's called within that threads loop, but it won't work on another thread unless AttachThreadInput() is used to share the message processing. However, AttachThreadInput() cannot be attached from or to the system thread (which is the one i'm using for my app) and in any case it would need to be a thread that has created a window and uses a windows message pump as well, which it does not. Looks like what I'm after is quite low-level, raw device state reading functionality but all I'm seeing is Windows event driven solutions. There's got to be a way to bypass all this windows guff and read directly from whatever hardware is present..surely..? Cheers for trying tho :) Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader