Simulating punctuation character input

Discussion in 'C++' started by Barb, Oct 9, 2003.

  1. Barb

    Barb Guest

    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
     
    Barb, Oct 9, 2003
    #1
    1. Advertising

  2. 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.learn.c-c++ faq:
    http://www.raos.demon.uk/acllc-c /faq.html
    Other sites:
    http://www.josuttis.com -- C++ STL Library book
     
    Thomas Matthews, Oct 9, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Leffer

    Regular expression for punctuation

    Chris Leffer, Jul 9, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    474
    Chris Leffer
    Jul 9, 2003
  2. Replies:
    2
    Views:
    606
    James Kanze
    Jul 20, 2007
  3. Ryan Mohr
    Replies:
    8
    Views:
    259
    Jesse Jurman
    Jun 17, 2010
  4. Replies:
    1
    Views:
    132
  5. Brandon Spiteri

    SPI; simulating an input (rx)

    Brandon Spiteri, May 1, 2014, in forum: VHDL
    Replies:
    8
    Views:
    208
Loading...

Share This Page