CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2006
    Posts
    31

    Is there a way to force a key press in C?

    I have a program running that requires a key press to activate. I need to press Ctrl+Alt+T. Is there a way to force those keys with a C program?

    The original thread is here if this clears things up or if there is a better solution: http://www.codeguru.com/forum/showthread.php?t=459599

    Thanks

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Is there a way to force a key press in C?

    Quote Originally Posted by Tineras
    I have a program running that requires a key press to activate. I need to press Ctrl+Alt+T. Is there a way to force those keys with a C program?
    Not portably. The 'C' language knows nothing about keyboards or keys. All of that functionality is provided for by the OS and the system libraries provided by the OS.

    So specify the OS you're using.

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    Feb 2006
    Posts
    31

    Re: Is there a way to force a key press in C?

    Nevermind this post. We came up with another solution.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured