How to send a physical key press?

How do I send a physical(Edit) key press(What I am using it for requires a physical keypress, and ik its possible in java, so C++ it is to.)

I don't wan't a simulating i.e SendInput, SendKeys

I wan't a keypress..
Last edited on
If it absolutely has to be a key-press for some imaginary reason of yours then press the key. Otherwise applications in Windows cannot see the physical keyboard so they have no way of telling the difference between SendKeys() or actual input. In order to know the difference they would need to install a keyboard hook and parse every message. I can tell you for a fact that most applications don't bother.
I fear I'm being niave, but if this actually isn't a trick question, what's wrong with just doing a SendMessage(hWnd, WM_CHAR, KeyCode, lParam-bits) ?
Topic archived. No new replies allowed.