Simulating punctuation character input

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Barb

    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
  • Thomas Matthews

    #2
    Re: Simulating punctuation character input

    Barb wrote:
    [color=blue]
    > 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[/color]

    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:

    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:

    Other sites:
    http://www.josuttis.com -- C++ STL Library book

    Comment

    Working...