Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


using keybd_event() correctly

This topic is 5626 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When I use keybd_event() like this:
string str = "CaSeSeNsItIvE @£$"
for (int i=0; i);

where KeyUp is defined as the WM_KEYUP, the output is all lowercase, even the @£$ come out as ''3 and 4 (the numbers under them, on my keyboard anyway) How do I use keybd_event() so whatever I send the output is the same?

Share this post

Link to post
Share on other sites
(I''m not positive, but if I had to guess...)

When You press a key on the keyboard, say ''a'', it just sends ''a'' to the computer. Now if you''re holding down shift at the same time (i.e. trying to type ''A'') then the computer get''s ''a'' and ''shift'' and has to interpret that into ''A''. So maybe the int representations of ''a'' and ''A'' are interpreted just as ''a'' when it''s a keyboard event.

The deal with the @$ and 34 stuff is probably something along the same lines.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!