Quantcast
Viewing all articles
Browse latest Browse all 168

Confused about keybd_event API function's parameters

The parameters to this function are:
bVk (a virtual key code)
bScan (a hardware key code)
dwFlags (controls whether the signal sent is for key pressed, or for key released)
dwExtraInfo (don't know what this is for, but examples I've seen usually set this to zero)

My question is, what's the difference between the "virtual" and "hardware" code for a given key? And also why does this function need to know BOTH the "virtual" and "hardware" codes? Isn't knowing just ONE of these values enough to send the proper signal to simulate a key press?

Viewing all articles
Browse latest Browse all 168

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>