473,805 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simulating punctuation character input

I'm simulating keyboard input in Visual C++ using the SendInput
function. It seems to work fine for all characters (A-Z, 0-9). I am
however having real problems trying to read other characters such as:
- = \ [ ] ; ' , . /

I am trying to grab the character by using VkKeyScan( '=' ). If I use
either VK_OEM_2 or VK_COMMA, they are not recognized. If I pass their
value as the input it simulates other input (opening different
applications as it inputs). I have tried different things and the
closest I got was that when I passed some, not all, of the char they
would be understood as if they were in the shift state. I was unable
to unshift them.

Any help on this topic would be much appreciated.

Thanks in advance.
Barb
Jul 19 '05 #1
1 2382
Barb wrote:
I'm simulating keyboard input in Visual C++ using the SendInput
function. It seems to work fine for all characters (A-Z, 0-9). I am
however having real problems trying to read other characters such as:
- = \ [ ] ; ' , . /

I am trying to grab the character by using VkKeyScan( '=' ). If I use
either VK_OEM_2 or VK_COMMA, they are not recognized. If I pass their
value as the input it simulates other input (opening different
applications as it inputs). I have tried different things and the
closest I got was that when I passed some, not all, of the char they
would be understood as if they were in the shift state. I was unable
to unshift them.

Any help on this topic would be much appreciated.

Thanks in advance.
Barb


More help can be found in a Microsoft Visual C++ newsgroup.
This newsgroup, news:comp.lang. c++, discusses the _standard_
C++ language, which has no facilities for VkKeyScan.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.l earn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4562
by: HumanJHawkins | last post by:
Hi, I have a table of text. I need to search for whole words within this text... For example, I need to be able to search for records that contain 'dog' but not return 'hotdog' or 'dogma' for example. I am doing this by throwing a space around both the records in the table and the search word like this: WHERE (' ' + Text + ' ') Like ('% ' + Search + ' %')
1
1981
by: balu | last post by:
Hi, I am developing a standalone or windows based application in vb.net which simulates a website. I would like to simulate this web form from my vb.net application: <form action ="cgi-images/accept_upload.pl" method = POST ENCTYPE="multipart/form-data"> <input type = text name = uname>
38
24013
by: Xah Lee | last post by:
sometimes i wish to add white space in <p> as to achived effects similar to tab. what should i do? using empty image seems the sure way but rather complicated. (and dosen't change size with font) Woudl some of the space character in unicode work? (my html files uses unicode) Xah
1
1433
by: dew | last post by:
Is there an easy way to edit a string so that only alphabetical characters and numbers are allowed? Thanks for your help.
6
4024
by: watcher00 | last post by:
Hi I'm a complete newbie at Perl and i was wondering if i can get some help completing an exercise i've come across. I need to count the punctuation marks from a text file and then output a list of all occurring punctuation marks with its frequency printed next to it. eg 2 hyphens 3 commas
13
3061
by: jerger | last post by:
my program takes users input (words/sentance) and translates it from english to hmong. I have to main variables, but cannot post my entire code. char In; CString in; basically the user cin >> In; then later in = In, then computes using the dictionary. is there anyway i can remove ! commas and periods from the input before translating in my dictionary? i keep getting error codes. if i do this (first idea) if (strcmp(In, "!") == 0)...
3
3461
by: MLH | last post by:
Back in mid-2003, lucason posted a question about removing punctuation chars from a string. Suggested code was posted using Replace function. Could the FN below be easily modified for use with A97 which has no replace FN? xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx lucason View profile
9
1788
by: chikkubhai | last post by:
Why is the result different for the following set of two code snippets Code without using this pointer #include <string> #include <iostream> using namespace std; struct X { private:
6
9435
by: Shiao | last post by:
Hello, I'm trying to build a regex in python to identify punctuation characters in all the languages. Some regex implementations support an extended syntax \p{P} that does just that. As far as I know, python re doesn't. Any idea of a possible alternative? Apart from manually including the punctuation character range for each and every language, I don't see how this can be done. Thank in advance for any suggestions.
0
10609
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10360
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10366
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10105
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9185
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.