Thread: Trouble with simulating keystrokes

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Android geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    470

    Trouble with simulating keystrokes

    Hi!
    i'm trying to simulate key presses and i did this:

    Code:
    keybd_event('G', NULL, KEYEVENTF_EXTENDEDKEY | 0, 0 );
    it wrote lowercase 'g' into notepad, not the uppercase 'G' that i've passed into the function. and when i pass the lowercase:

    Code:
    keybd_event('g', NULL, KEYEVENTF_EXTENDEDKEY | 0, 0 );
    it writes '7', not 'g'?
    So why is this happening? how can i correctly simulate key strokes?

    Thanks for any help.
    Last edited by geek@02; 03-08-2006 at 07:55 AM.
    GameJolt: https://gamejolt.com/@KasunL
    Game Development Youtube:
    https://is.gd/XyhYoP
    Amateur IT Blog: http://everything-geeky.blogspot.com/



    (and, sorry for my amateur English)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Trouble with assignment in C
    By mohanlon in forum C Programming
    Replies: 17
    Last Post: 06-23-2009, 10:44 AM
  2. Fake keystrokes to another process
    By Nota in forum Windows Programming
    Replies: 20
    Last Post: 01-26-2009, 11:56 PM
  3. Sending keystrokes to another view
    By azeemanwer in forum C++ Programming
    Replies: 2
    Last Post: 08-28-2007, 10:41 AM
  4. Send keystrokes to a running program via batch file
    By ganjamon in forum Windows Programming
    Replies: 2
    Last Post: 08-16-2005, 08:08 AM