How to send keystrokes from a C program?

This is a discussion on How to send keystrokes from a C program? within the Linux Programming forums, part of the Platform Specific Boards category; I'm somewhat new to Linux development, and I need to know how to send keystrokes programmatically from a C program. ...

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    2

    How to send keystrokes from a C program?

    I'm somewhat new to Linux development, and I need to know how to send keystrokes programmatically from a C program. What libraries/code do I have to use to do this? In case it's somehow dependent on your GUI/Window Manager, I use KDE 3.5.

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    send them where?

  3. #3
    Registered User
    Join Date
    Aug 2007
    Posts
    2
    To whichever program is active. Basically, just make it do whatever it would do if I pressed the key on the keyboard. The program that will do this will be running in the background.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 01:42 AM
  2. send keystrokes
    By szymek116 in forum Linux Programming
    Replies: 2
    Last Post: 06-13-2005, 04:24 AM
  3. Date program starts DOS's date
    By jrahhali in forum C++ Programming
    Replies: 1
    Last Post: 11-24-2003, 04:23 PM

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