Thread: Simulating the VK_RETURN key

  1. #1
    Code Warrior
    Join Date
    Nov 2001
    Posts
    669

    Question Simulating the VK_RETURN key

    Hi!

    I'm programming a mouse and a keyboard in the WINAPI (win2k and .NET studio) for my console program. Whenever the user clicks with the left mouse button on specific x and y range something will happen. And I want that the keyboard and the mouse will work together. I do not know how to combine them (for the key being pressed and the mouse button being pressed there are two different switch sentence) so I think I found the solution. The solution is that I would simulate a VK_RETURN key. I was trying something with the keybd_event function but does not work.
    Code:
    keybd_event (VK_RETURN, 0, 0, 0);
    Anyone has a solution for this?
    Current projects:
    1) User Interface Development Kit (C++)
    2) HTML SDK (C++)
    3) Classes (C++)
    4) INI Editor (Delphi)

  2. #2
    Code Warrior
    Join Date
    Nov 2001
    Posts
    669

    Thumbs up

    I found the problem. The problem was that the y-coordinate was wrong defined.
    Current projects:
    1) User Interface Development Kit (C++)
    2) HTML SDK (C++)
    3) Classes (C++)
    4) INI Editor (Delphi)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  3. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM
  4. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM