VK_OEM_PERIOD doing a > instead of a .

This is a discussion on VK_OEM_PERIOD doing a > instead of a . within the Windows Programming forums, part of the Platform Specific Boards category; i dont know why but when doing .. keybd_event( VK_OEM_PERIOD ,0x45,KEYEVENTF_EXTENDEDKEY |0 , 0 ); keybd_event( VK_OEM_PERIOD ,0x45,KEYEVENTF_KEYUP | 0,0 ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    306

    VK_OEM_PERIOD doing a > instead of a .

    i dont know why but when doing ..

    keybd_event( VK_OEM_PERIOD ,0x45,KEYEVENTF_EXTENDEDKEY |0 , 0 );
    keybd_event( VK_OEM_PERIOD ,0x45,KEYEVENTF_KEYUP | 0,0 );

    does a > and not a .

    anyone know whats the prob?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,417
    Perhaps you got the shift state wrong?

    Why are you bitwise or'ing with zero anyway?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    How about just using '.' rather than VK_OEM_PERIOD?

  4. #4
    Registered User
    Join Date
    Nov 2002
    Posts
    306
    doing '.' does a BACKspace
    Last edited by Anddos; 08-23-2006 at 12:17 PM.

  5. #5
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    The code you posted works for me in a console application. Maybe try using SendInput instead (if using Windows NT or later)? This seems to work:
    Code:
      INPUT inpt[2] = {0};
      inpt[0].type = INPUT_KEYBOARD;
      inpt[0].ki.wScan = '.';
      inpt[0].ki.dwFlags = KEYEVENTF_UNICODE;
      
      inpt[1].type = INPUT_KEYBOARD;
      inpt[1].ki.wScan = '.';
      inpt[1].ki.dwFlags = KEYEVENTF_UNICODE|KEYEVENTF_KEYUP;
      
      SendInput(2,inpt,sizeof(INPUT));
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  6. #6
    Registered User
    Join Date
    Nov 2002
    Posts
    306
    i am gonna need the includes and headers , otherwsie 26 compile errors

  7. #7
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    I am asuming that one of those errors are that the compiler doesn't recognize the INPUT structer or the SendInput() function.

    Here is some advice, when you get such errors, go to your compiler's include folder, and search it's files for that function or structer. A .H file should come up. Include that one. Do the same with the compiler's lib folder, and link that .LIB file to your project settings.

  8. #8
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    >> i am gonna need the includes and headers , otherwsie 26 compile errors

    BTW: Includes and headers are the same thing. (At least in your case.)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. small -> big -> bigger -> bigger than bigger -> ?
    By happyclown in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 03-11-2009, 12:12 PM
  2. Dev-C++ -> Tools - > Editor -> Syntax
    By Yuri2 in forum C++ Programming
    Replies: 19
    Last Post: 07-03-2006, 07:48 AM
  3. > > > Urgent Help < < <
    By CodeCypher in forum C Programming
    Replies: 2
    Last Post: 01-31-2006, 01:06 PM
  4. electricity > AC circuits > tesla coil
    By dbaryl in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 03-14-2002, 01:16 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21