January 12, 2010

emulating keyboard and mice input from s/w : The uinput system

The linux kernel exposes the uinput API for emulating keyboard and mice input events from any program. The default uinput API is a low-level API, requiring most operations to be done using FCNTL functions, a detailed explanation of its use can be found here.
The basic requirement for using the uinput system is that the uinput module be loaded(can be checked using lsmod). From recent discussions on the ILUGC mailing lists, I have also come across libsuinput, which is a wrapper around the low-level library and provides easier emulation.

2 comments:

  1. Hello.. Can you tell me exactly how to run the c program after including this library with gcc? I mean what commands are needed ? The make file included with the examples is not linking the library.

    ReplyDelete
  2. I am not sure which one you are talking about, uinput or libsuinput ?

    ReplyDelete