is it possible to execute keyboard input programmaticly in linux?

Posted by Taylor Hawkes on Programmers See other posts from Programmers or by Taylor Hawkes
Published on 2012-09-29T16:46:09Z Indexed on 2012/09/29 21:49 UTC
Read the original article Hit count: 309

Filed under:
|
|

For example is there a Linux command or way that I could from a program (c++ | python| or other) enter a serious of keyboard inputs that are interpreted as though they are keyboard inputs.

I have a bad case of RSI from typing. To ease my pain I developed a voice controlled interface using pocket sphinx and a custom grammar and to run a number of very common commands. ex: "open chrome" , "open vim".

basically what is shown here, but with slightly diff tools: http://bloc.eurion.net/archives/2008/writing-a-command-and-control-application-with-voice-recognition/

I have run into some limitation as I can only execute command line commands given a voice command. Rather than having a "voice command" -> "command line command" mapping I would like to have "voice command" -> "keyboard input" mapping. So when my active window is a browser and i type + n, and new tab opens. If i'm in vim and new vim tab opens.

Any suggestions, ideas, tools or approaches to this problem would be much appreciated. I understand the answer may not be simple, but would like to develop it none the less.

© Programmers or respective owner

Related posts about c++

Related posts about linux