About keybd_event

Posted on 2003-02-21
Medium Priority
Last Modified: 2012-05-04
How can i send the phrase let's say "good?"
i can send "good" but how will i send the "?" it goes as "/" which is the representative key on the keyboard.
Question by:thanasis_kap
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 18

Expert Comment

ID: 7994597
hold down the shift key:

keybd_event (VK_SHIFT, 0, 0, 0);
keybd_event (VK_DIVIDE, 0, 0, 0);
keybd_event (VK_SHIFT, 0, KEYEVENTF_KEYUP, 0);
LVL 18

Expert Comment

ID: 7994636
oops, sorry:

keybd_event(VK_SLASH, 0,0,0); instead of VK_DIVIDE

Author Comment

ID: 7996006
that is a really good solution yet i want this for every string i pass to my function.
so it should automatically create an extended event key for it. Did you understand what i am thinking?

like VkScanKey sth similar VkExtended key and then
call keybd_event(0,ExtKey,0,0);
for every key desired.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 18

Accepted Solution

bobbit31 earned 240 total points
ID: 7996861
i don't really understand what you are saying, but you could simply check the ascii character code of the current character and if it should be capitalized, hold down shift.
See this chart to figure out which ones should be capitalized: http://kb.indiana.edu/data/afbi.html?cust=6660


Author Comment

ID: 8003112
What I'm saying is that i don't want my string first to be passed through a function to see if shift is needed to be pressed but i want this to be done from windows.
LVL 11

Expert Comment

ID: 9784122
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered: Points to bobbit31

Please leave any comments here within the next seven days. Experts: Silence
means you don't care.


-bcl (bcladd)
EE Cleanup Volunteer

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question