keybd_event( key, 0, 0, 0); Have you tried using more meaningful parameters then 0?
Yes, I've tried issuing a scan code as the second parameter, it was no use. I tried sending the keybd_event and then sending another one with KEYEVENTF_KEYUP to "emulate" a key press and a release and still no change. I've tried setting dummy values as the last parameter, but had similar results. I don't know what it's for and msdn was not helpful...